welcome to myblog Dome地址 爬取某个车站的图片 item.py 中 1.申明item 的fields class PhotoItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() image_urls = scrapy.Field() images = scrapy.Field() pass spider 的image.py 导入头文件 from Phot…
话不多说,直接开始,直接放上整个程序过程 1.创建工程和生成spiders就不用说了,会用scrapy的都知道. 2.items.py class HarryItem(scrapy.Item): # define the fields for your item here like: img_url = scrapy.Field() img_name = scrapy.Field() 3.pipelines.py import os from harry.settings import IMAG…