mirror of
https://github.com/soimort/you-get.git
synced 2025-02-09 03:37:52 +03:00
update common.py
bilibili http466 因为 http://interface.bilibili.com/playurl没加ua导致接口返回数据里的链接是466, 修改之后就好了
This commit is contained in:
parent
6e17b0c7f9
commit
5748616994
@ -404,7 +404,8 @@ def get_content(url, headers={}, decoded=True):
|
||||
"""
|
||||
|
||||
logging.debug('get_content: %s' % url)
|
||||
|
||||
if 'User-Agent' not in headers.keys():
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
|
||||
req = request.Request(url, headers=headers)
|
||||
if cookies:
|
||||
cookies.add_cookie_header(req)
|
||||
|
Loading…
Reference in New Issue
Block a user