Sina: enhance regex; fix #55

This commit is contained in:
Mort Yao 2013-01-06 00:08:57 +01:00
parent bc5b704e0e
commit 8d0c066986

View File

@ -27,7 +27,7 @@ def sina_download_by_id(id, title = None, output_dir = '.', merge = True, info_o
download_urls(urls, title, 'flv', size, output_dir = output_dir, merge = merge) download_urls(urls, title, 'flv', size, output_dir = output_dir, merge = merge)
def sina_download(url, output_dir = '.', merge = True, info_only = False): def sina_download(url, output_dir = '.', merge = True, info_only = False):
id = r1(r'vid :\'(\d+)\',', get_html(url)) id = r1(r'vid\s*:\s*\'(\d+)\',\n', get_html(url))
sina_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only) sina_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only)
site_info = "Sina.com" site_info = "Sina.com"