Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

fix bug in scrapy shell which was hiding the objects fetch/view/shelp when started without a url as argument

Pablo Hoffman51eb641fc772
diff --git a/scrapy/shell.py b/scrapy/shell.py
index df687a762..3607f5c2c 100644
--- a/scrapy/shell.py
+++ b/scrapy/shell.py
@@ -74,11 +74,10 @@ class Shell(object):
self.vars['response'] = response
self.vars['request'] = request
self.vars['spider'] = spiders.fromurl(url)
-
- if not self.nofetch:
- self.vars['fetch'] = self.fetch
- self.vars['view'] = open_in_browser
- self.vars['shelp'] = self.print_help
+ if not self.nofetch:
+ self.vars['fetch'] = self.fetch
+ self.vars['view'] = open_in_browser
+ self.vars['shelp'] = self.print_help
if self.update_vars:
self.update_vars(self.vars)