mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
[qq] fix title for some videos
e.g. http://v.qq.com/cover/p/ps6mnfqyrfo7es3.html?vid=q0181hpdvo5 hope this won't break others, or we should try to recognize the URL pattern (maybe apply to only URLs with "/cover/")?
This commit is contained in:
parent
1c208f2a91
commit
bd2179ed76
@ -19,6 +19,9 @@ def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|||||||
content = get_html(url)
|
content = get_html(url)
|
||||||
vid = match1(content, r'vid\s*:\s*"\s*([^"]+)"')
|
vid = match1(content, r'vid\s*:\s*"\s*([^"]+)"')
|
||||||
title = match1(content, r'title\s*:\s*"\s*([^"]+)"')
|
title = match1(content, r'title\s*:\s*"\s*([^"]+)"')
|
||||||
|
# try to get the right title for URLs like this:
|
||||||
|
# http://v.qq.com/cover/p/ps6mnfqyrfo7es3.html?vid=q0181hpdvo5
|
||||||
|
title = matchall(content, [r'title\s*:\s*"\s*([^"]+)"'])[-1]
|
||||||
|
|
||||||
qq_download_by_vid(vid, title, output_dir, merge, info_only)
|
qq_download_by_vid(vid, title, output_dir, merge, info_only)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user