This commit is contained in:
Mort Yao 2012-11-30 19:57:37 +01:00
parent 77a425a0b4
commit 58a2dfae6e

View File

@ -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':