add Accept-Language, use akas
This commit is contained in:
parent
da51407e7d
commit
09e0a521af
1 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,8 @@ def prepare_url(url, data=None, headers=cache.DEFAULT_HEADERS, timeout=cache.cac
|
||||||
headers = headers.copy()
|
headers = headers.copy()
|
||||||
# https://webapps.stackexchange.com/questions/11003/how-can-i-disable-reconfigure-imdbs-automatic-geo-location-so-it-does-not-defau
|
# https://webapps.stackexchange.com/questions/11003/how-can-i-disable-reconfigure-imdbs-automatic-geo-location-so-it-does-not-defau
|
||||||
headers['X-Forwarded-For'] = '72.21.206.80'
|
headers['X-Forwarded-For'] = '72.21.206.80'
|
||||||
|
headers['Accept-Language'] = 'en'
|
||||||
|
|
||||||
return url, data, headers, timeout, unicode
|
return url, data, headers, timeout, unicode
|
||||||
|
|
||||||
def read_url(url, data=None, headers=cache.DEFAULT_HEADERS, timeout=cache.cache_timeout, valid=None, unicode=False):
|
def read_url(url, data=None, headers=cache.DEFAULT_HEADERS, timeout=cache.cache_timeout, valid=None, unicode=False):
|
||||||
|
@ -34,7 +36,7 @@ def delete_url(url, data=None, headers=cache.DEFAULT_HEADERS):
|
||||||
cache.store.delete(url, data, headers)
|
cache.store.delete(url, data, headers)
|
||||||
|
|
||||||
def get_url(id):
|
def get_url(id):
|
||||||
return "http://www.imdb.com/title/tt%s/" % id
|
return "http://akas.imdb.com/title/tt%s/" % id
|
||||||
|
|
||||||
|
|
||||||
def reference_section(id):
|
def reference_section(id):
|
||||||
|
|
Loading…
Reference in a new issue