Skip to content

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

Use built-in range()

Paul Tremberth70a69d2199c3
diff --git a/scrapy/commands/fetch.py b/scrapy/commands/fetch.py
index 6fe6d73b9..7d4840529 100644
--- a/scrapy/commands/fetch.py
+++ b/scrapy/commands/fetch.py
@@ -56,7 +56,7 @@ class Command(ScrapyCommand):
# by default, let the framework handle redirects,
# i.e. command handles all codes expect 3xx
if not opts.no_redirect:
- request.meta['handle_httpstatus_list'] = SequenceExclude(six.moves.range(300, 400))
+ request.meta['handle_httpstatus_list'] = SequenceExclude(range(300, 400))
else:
request.meta['handle_httpstatus_all'] = True
diff --git a/scrapy/shell.py b/scrapy/shell.py
index babc267c7..6f94635a1 100644
--- a/scrapy/shell.py
+++ b/scrapy/shell.py
@@ -7,7 +7,6 @@ from __future__ import print_function
import os
import signal
-from six.moves import range
import warnings
from twisted.internet import reactor, threads, defer