我试图刮掉一个带有分页链接的网站,所以我这样做了import scrapyclass SummymartSpider(scrapy.Spider): name = 'dummymart' allowed_domains = ['www.dummrmart.com/product'] start_urls = ['https://www.dummymart.net/product/auto-parts--118?page%s'% page for page in range(1,20)]有效!!与单个网址,它的工作原理,但当我尝试做到这一点: import scrapy class DummymartSpider(scrapy.Spider): name = 'dummymart' allowed_domains = ['www.dummymart.com/product'] start_urls = ['https://www.dummymart.net/product/auto-parts--118?page%s', 'https://www.dummymart.net/product/accessories-tools--112?id=1316264860?page%s'% page for page in range(1,20)]它不起作用,但是对于多个URL,我如何实现相同的逻辑?谢谢
添加回答
举报
0/150
提交
取消