Scrapy, a fast high-level web crawling & scraping framework for Python.
issue GH #1550 - fixed error: shell command wasn't accepting files URIs
Leonid Amirov98a2e77a75f0
diff --git a/scrapy/commands/shell.py b/scrapy/commands/shell.pyindex 92ebbe605..f10da4370 100644--- a/scrapy/commands/shell.py+++ b/scrapy/commands/shell.py@@ -5,11 +5,11 @@ See documentation in docs/topics/shell.rst"""from threading import Thread+from w3lib.url import any_to_urifrom scrapy.commands import ScrapyCommandfrom scrapy.shell import Shellfrom scrapy.http import Request-from scrapy.utils.url import add_http_if_no_schemefrom scrapy.utils.spider import spidercls_for_request, DefaultSpider@@ -43,7 +43,8 @@ class Command(ScrapyCommand):def run(self, args, opts):url = args[0] if args else Noneif url:- url = add_http_if_no_scheme(url)+ url = any_to_uri(url)+spider_loader = self.crawler_process.spider_loaderspidercls = DefaultSpider