mirror of https://github.com/scrapy/scrapy.git
remove missing import
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40883
This commit is contained in:
parent
26bcc826e3
commit
5338a48db8
|
|
@ -1,6 +1,5 @@
|
|||
from scrapy.command import ScrapyCommand
|
||||
from scrapy.core.manager import scrapymanager
|
||||
from scrapy.replay import Replay
|
||||
from scrapy.conf import settings
|
||||
from scrapy.utils.url import is_url
|
||||
from scrapy.spider import spiders
|
||||
|
|
@ -20,8 +19,6 @@ class Command(ScrapyCommand):
|
|||
parser.add_option("--nocache", dest="nocache", action="store_true", help="disable HTTP cache")
|
||||
parser.add_option("--nopipeline", dest="nopipeline", action="store_true", help="disable scraped item pipeline")
|
||||
parser.add_option("--restrict", dest="restrict", action="store_true", help="restrict crawling only to the given urls")
|
||||
parser.add_option("--record", dest="record", help="use FILE for recording session (see replay command)", metavar="FILE")
|
||||
parser.add_option("--record-dir", dest="recorddir", help="use DIR for recording (instead of file)", metavar="DIR")
|
||||
parser.add_option("-n", "--nofollow", dest="nofollow", action="store_true", help="don't follow links (for use with URLs only)")
|
||||
parser.add_option("-c", "--callback", dest="callback", action="store", help="use the provided callback for starting to crawl the given url")
|
||||
|
||||
|
|
@ -39,12 +36,6 @@ class Command(ScrapyCommand):
|
|||
if opts.nofollow:
|
||||
settings.overrides['CRAWLSPIDER_FOLLOW_LINKS'] = False
|
||||
|
||||
if opts.record or opts.recorddir:
|
||||
# self.replay is used for preventing Replay signals handler from
|
||||
# disconnecting since pydispatcher uses weak references
|
||||
self.replay = Replay(opts.record or opts.recorddir, mode='record', usedir=bool(opts.recorddir))
|
||||
self.replay.record(args=args, opts=opts.__dict__)
|
||||
|
||||
def run(self, args, opts):
|
||||
if opts.callback:
|
||||
requests = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue