scrapy how to make my own scheduler middelware

自古美人都是妖i 提交于 2020-01-02 06:54:33

问题


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:

  1. I have to make my own python class and assign it in the setting using SCHEDULER_MIDDLEWARES
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!