From first spider you can save url in some DB or send to some queue (Zerro, Rabbit MQ, Redis) for example via pipeline.
Second spider can get the url with method - start_requests
class MySpider(scrapy.Spider):
name = 'myspider'
def start_requests(self):
urls = my_db.orm.get('urls');
for url in urls:
yield scrapy.Request(url)
Or urls can be passed to spider from queue broker via cli or API. Or spider can be just launched from broker and launched spider get his url by start_requests.
Really exists many ways how you can do it. The way depend of the criteria why you need to pass urls from one spider to other.
You can check this projects: Scrapy-Cluster, Scrapy-Redis. May be its what you searching for.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…