QQ: dirty fix #153

This commit is contained in:
Mort Yao 2013-04-14 17:32:23 +02:00
parent e10068f656
commit 92490d35ee

View File

@ -55,7 +55,7 @@ def parse_cid_playurl(xml):
def bilibili_download_by_cid(id, title, output_dir = '.', merge = True, info_only = False):
url = 'http://interface.bilibili.tv/playurl?cid=' + id
urls = parse_cid_playurl(get_html(url, 'utf-8'))
urls = [i if not re.match(r'.*\.qqvideo\.tc\.qq\.com', i) else re.sub(r'.*\.qqvideo\.tc\.qq\.com', 'http://vsrc.store.qq.com', i) for i in parse_cid_playurl(get_html(url, 'utf-8'))] # dirty fix for QQ
if re.search(r'\.(flv|hlv)\b', urls[0]):
type = 'flv'