mirror of https://github.com/scrapy/scrapy.git
20 lines
482 B
Python
20 lines
482 B
Python
#coding: utf-8
|
|
import asyncio
|
|
|
|
from scrapy import Request
|
|
|
|
from tests.test_engine import TestSpider
|
|
|
|
|
|
class StartRequestsAsyncGenSpider(TestSpider):
|
|
async def start_requests(self):
|
|
for url in self.start_urls:
|
|
yield Request(url, dont_filter=True)
|
|
|
|
|
|
class StartRequestsAsyncGenAsyncioSpider(TestSpider):
|
|
async def start_requests(self):
|
|
for url in self.start_urls:
|
|
yield Request(url, dont_filter=True)
|
|
await asyncio.sleep(1)
|