scrapy item类名必须有Item字样

items.py

名字必须有Item,如果没有Item在运行时会提醒如写

  File "/home/apuser/dong/scrapy-itzhaopin/itzhaopin/itzhaopin/spiders/tencent_spider.py", line 88, in parse_item
    item['ID'] = site.css('tr > td.id a::text').extract()[0]
TypeError: 'LavaJobs' object does not support item assignment

class LavaJobsItem(Item):

    ID = Field()
    jobdetailLink = Field()
    status = Field()
    priority = Field()
    device = Field()

你可能感兴趣的:(scrapy,大数据,scrapy)