Skip to content

Commit 972b31c

Browse files
committed
Explicitly set the default request headers.
1 parent 3d4e7ff commit 972b31c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

zipru_scraper/settings.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@
3838
#TELNETCONSOLE_ENABLED = False
3939

4040
# Override the default request headers:
41-
#DEFAULT_REQUEST_HEADERS = {
42-
# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
43-
# 'Accept-Language': 'en',
44-
#}
41+
DEFAULT_REQUEST_HEADERS = {
42+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
43+
'User-Agent': USER_AGENT,
44+
'Connection': 'Keep-Alive',
45+
'Accept-Encoding': 'gzip, deflate',
46+
'Accept-Language': 'en-US,*',
47+
}
4548

4649
# Enable or disable spider middlewares
4750
# See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html

0 commit comments

Comments
 (0)