1.需求:爬取站长素材中的高清图片(http://sc.chinaz.com/tupian/)
2.编码流程
3.示例代码
import scrapy
from ..items import ImgproItem
class ImgspiderSpider(scrapy.Spider):
name = 'imgspider'
# allowed_domains = ['sc.chinaz.com/']
start_urls = ['http://sc.chinaz.com/tupian/index.html']
url = 'http://sc.chinaz.com/tupian/index_%d.html'
page_num = 2
def parse(self, response):
item =</