def start_requests(self):
self.list = []
urls = [..page lists..]
# parsing itemurls in pagelist
for url in urls:
yield SplashRequest(url, callback=self.parse_list, args={
'wait': 1.0
}, meta={'Referer' : url}) # self.list.append(page list url)
# parsing items
for it in self.list:
yield Request(it, callback=self.parse)
我想解析所有项目网址(self.parse_list) 并解析所有项目的详细信息,但是我运行了Spider,然后只有self.parse_list激活并关闭了。
self.list和self.parse如何在start_requests中运行?