mirror of https://github.com/scrapy/scrapy.git
set more proper request priority for robots middleware and media pipeline
This commit is contained in:
parent
c22d2b1587
commit
7933e00ebd
|
|
@ -18,7 +18,7 @@ from scrapy.core.exceptions import IgnoreRequest
|
|||
from scrapy.conf import settings
|
||||
|
||||
class RobotsTxtMiddleware(object):
|
||||
DOWNLOAD_PRIORITY = -1
|
||||
DOWNLOAD_PRIORITY = 1000
|
||||
|
||||
def __init__(self):
|
||||
if not settings.getbool('ROBOTSTXT_OBEY'):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from scrapy.spider import spiders
|
|||
|
||||
|
||||
class MediaPipeline(object):
|
||||
DOWNLOAD_PRIORITY = -1
|
||||
DOWNLOAD_PRIORITY = 1000
|
||||
|
||||
class DomainInfo(object):
|
||||
def __init__(self, domain):
|
||||
|
|
|
|||
Loading…
Reference in New Issue