问题
I am using Python 2.7 with Scrapy 0.20
My Question
How to build my own scheduler ?
What I have tried
I read through internet and I found this:
- I have to make my own python class and assign it in the setting using SCHEDULER_MIDDLEWARES
- Create that class,which is maybe inhertes from
scrapy.core.scheduler
But I couldn't find any example on internet nor any official documentation
回答1:
You can set the SCHEDULER setting:
SCHEDULER = 'myproject.schedulers.MyScheduler'
and copy the code from scheduler.py.
来源:https://stackoverflow.com/questions/22414480/scrapy-how-to-make-my-own-scheduler-middelware