首先,在items.py中定义几个字段用来保存网页数据(网址,标题,网页源码) 如下所示: import scrapy class MycnblogsItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() page_title = scrapy.Field() page_url = scrapy.Field() page_html = scrapy.Field() 最重要的是我