0
我有一個scrapy項目。我已將蜘蛛與硒webdriver集成在一起,代碼看起來像這樣。Scrapy多個蜘蛛系列執行
def start(i):
//do some navigation with selenium webdriver
return url
class abc(BaseSpider):
name = '123'
x = start(5)
start_urls = [x]
def parse(self, response):
// scrape data.
class fgh(BaseSpider):
name = '456'
x = start(8)
start_urls = [x]
def parse(self, response):
// scrape data.
.... and so on {20 classes as such}..
現在每當我試圖scrapy crawl 456
,它開始從第一隻蜘蛛是「123」執行。控制權沒有被轉移到各自的蜘蛛。我是新來的硒和scrapy。請幫忙。