ApifyScheduler
Index
Methods
__init__
Create a new instance.
Returns None
enqueue_request
Add a request to the scheduler.
This could be called from either from a spider or a downloader middleware (e.g. redirect, retry, ...).
Parameters
request: Request
The request to add to the scheduler.
Returns bool
True if the request was successfully enqueued, False otherwise.
has_pending_requests
Check if the scheduler has any pending requests.
Returns bool
True if the scheduler has any pending requests, False otherwise.
next_request
Fetch the next request from the scheduler.
Returns Request | None
The next request, or None if there are no more requests.
open
Open the scheduler.
Parameters
spider: Spider
The spider that the scheduler is associated with.
Returns None
A Scrapy scheduler that uses the Apify Request Queue to manage requests.
This scheduler requires the asyncio Twisted reactor to be installed.