fix assert error of file extension

This commit is contained in:
Ming Dai 2012-12-12 16:37:43 +08:00
parent 44ce2e8f31
commit b138f9399a

View File

@ -17,7 +17,7 @@ def w56_download_by_id(id, title = None, output_dir = '.', merge = True, info_on
assert len(files) == 1
size = int(files[0]['filesize'])
url = files[0]['url']
ext = r1(r'\.([^.]+)$', url)
ext = r1(r'\.([^.]+)\?', url)
assert ext in ('flv', 'mp4')
print_info(site_info, title, ext, size)