Scrapy, a fast high-level web crawling & scraping framework for Python.
applied Patrick Mézard patch for loading local files
Pablo Hoffman57189e1b92bb
diff --git a/scrapy/trunk/scrapy/command/commands/shell.py b/scrapy/trunk/scrapy/command/commands/shell.pyindex 32bacd20b..541f8be8a 100644--- a/scrapy/trunk/scrapy/command/commands/shell.py+++ b/scrapy/trunk/scrapy/command/commands/shell.py@@ -1,6 +1,6 @@from twisted.internet import reactor-import urlparse+import os, urllib, urlparseimport scrapyfrom scrapy.command import ScrapyCommandfrom scrapy.spider import spiders@@ -60,6 +60,11 @@ class Command(ScrapyCommand):def get_url(self, url):u = urlparse.urlparse(url)+ if not u.scheme:+ path = os.path.abspath(url).replace(os.sep, '/')+ url = 'file://' + urllib.pathname2url(path)+ u = urlparse.urlparse(url)+if u.scheme not in ('http', 'https', 'file'):print "Unsupported scheme '%s' in URL: <%s>" % (u.scheme, url)return