爬虫之item定义样本代码

样本一

from scrapy.item import Item, Field

class DoubanItem(Item):
name = Field()
description = Field()
url = Field()

样本二

import scrapy

class CnblogItem(scrapy.Item):
title = scrapy.Field()
link = scrapy.Field()

 

Author: bkdwei