User agent: Firefox on Ubuntu.
This commit is contained in:
parent
cf9848fc86
commit
9a175103ee
2
buku
2
buku
@ -44,6 +44,7 @@ titleData = None # Title fetched from a webpage
|
|||||||
interrupted = False # Received SIGINT
|
interrupted = False # Received SIGINT
|
||||||
DELIMITER = ',' # Delimiter used to store tags in DB
|
DELIMITER = ',' # Delimiter used to store tags in DB
|
||||||
_VERSION_ = '2.3' # Program version
|
_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
|
# Crypto globals
|
||||||
@ -1021,6 +1022,7 @@ def connect_server(url, fullurl=False, forced=False):
|
|||||||
|
|
||||||
urlconn.request('GET', url, None, {
|
urlconn.request('GET', url, None, {
|
||||||
'Accept-encoding': 'gzip',
|
'Accept-encoding': 'gzip',
|
||||||
|
'User-Agent': USER_AGENT,
|
||||||
'DNT': '1',
|
'DNT': '1',
|
||||||
})
|
})
|
||||||
return (urlconn, urlconn.getresponse())
|
return (urlconn, urlconn.getresponse())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user