mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
utils.request: send chrome user-agent instead of the default one
This commit is contained in:
parent
28581838b0
commit
64b2ac0240
@ -37,8 +37,9 @@ class HTTP(Session):
|
|||||||
return self.get(url, stream=True).url
|
return self.get(url, stream=True).url
|
||||||
|
|
||||||
def request(self, method, url, *args, **kwargs):
|
def request(self, method, url, *args, **kwargs):
|
||||||
|
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.3"}
|
||||||
log.debug("HTTP getting %r", url)
|
log.debug("HTTP getting %r", url)
|
||||||
res = Session.request(self, method, url, **kwargs)
|
res = Session.request(self, method, url, headers=headers, *args, **kwargs)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user