mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
fix #30, merge iambus/youku-lixian#51: bilibili
This commit is contained in:
parent
77a425a0b4
commit
58a2dfae6e
@ -78,6 +78,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
flashvars = r1_of([r'flashvars="([^"]+)"', r'"https://secure.bilibili.tv/secure,(cid=\d+)"'], html)
|
flashvars = r1_of([r'flashvars="([^"]+)"', r'"https://secure.bilibili.tv/secure,(cid=\d+)"'], html)
|
||||||
assert flashvars
|
assert flashvars
|
||||||
t, id = flashvars.split('=', 1)
|
t, id = flashvars.split('=', 1)
|
||||||
|
id = id.split('&')[0]
|
||||||
if t == 'cid':
|
if t == 'cid':
|
||||||
bilibili_download_by_cid(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
bilibili_download_by_cid(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
||||||
elif t == 'vid':
|
elif t == 'vid':
|
||||||
|
Loading…
Reference in New Issue
Block a user