User agent: Firefox on Ubuntu.

This commit is contained in:
Arun Prakash Jana 2016-07-01 01:22:35 +05:30
parent cf9848fc86
commit 9a175103ee
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB

2
buku
View File

@ -44,6 +44,7 @@ titleData = None # Title fetched from a webpage
interrupted = False # Received SIGINT
DELIMITER = ',' # Delimiter used to store tags in DB
_VERSION_ = '2.3' # Program version
USER_AGENT = ('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0')
# Crypto globals
@ -1021,6 +1022,7 @@ def connect_server(url, fullurl=False, forced=False):
urlconn.request('GET', url, None, {
'Accept-encoding': 'gzip',
'User-Agent': USER_AGENT,
'DNT': '1',
})
return (urlconn, urlconn.getresponse())