diff --git a/docs/topics/commands.rst b/docs/topics/commands.rst index 6636c30cb..eaeeee113 100644 --- a/docs/topics/commands.rst +++ b/docs/topics/commands.rst @@ -358,6 +358,12 @@ Opens the given URL in a browser, as your Scrapy spider would "see" it. Sometimes spiders see pages differently from regular users, so this can be used to check what the spider "sees" and confirm it's what you expect. +Supported options: + +* ``--spider=SPIDER``: bypass spider autodetection and force use of specific spider + +* ``--no-redirect``: do not follow HTTP 3xx redirects (default is to follow them) + Usage example:: $ scrapy view http://www.example.com/some/page.html diff --git a/scrapy/commands/view.py b/scrapy/commands/view.py index 4eb44f77d..59e665016 100644 --- a/scrapy/commands/view.py +++ b/scrapy/commands/view.py @@ -11,9 +11,8 @@ class Command(fetch.Command): "contents in a browser" def add_options(self, parser): - ScrapyCommand.add_options(self, parser) - parser.add_option("--spider", dest="spider", - help="use this spider") + super(Command, self).add_options(parser) + parser.remove_option("--headers") def _print_response(self, response, opts): open_in_browser(response)