mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
qq compatible with new urls and modify baomihua getvidourl address
This commit is contained in:
parent
24b2b4cb55
commit
7baa1f029e
@ -7,7 +7,7 @@ from ..common import *
|
||||
import urllib
|
||||
|
||||
def baomihua_download_by_id(id, title=None, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
html = get_html('http://play.baomihua.com/getvideourl.aspx?flvid=%s' % id)
|
||||
html = get_html('http://play.baomihua.com/getvideourl.aspx?flvid=%s&devicetype=phone_app' % id)
|
||||
host = r1(r'host=([^&]*)', html)
|
||||
assert host
|
||||
type = r1(r'videofiletype=([^&]*)', html)
|
||||
|
@ -50,7 +50,7 @@ def qq_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
else:
|
||||
content = get_html(url)
|
||||
vid = parse_qs(urlparse(url).query).get('vid') #for links specified vid like http://v.qq.com/cover/p/ps6mnfqyrfo7es3.html?vid=q0181hpdvo5
|
||||
vid = vid[0] if vid else match1(content, r'vid\s*:\s*"\s*([^"]+)"') #general fallback
|
||||
vid = vid[0] if vid else match1(content, r'vid"*\s*:\s*"\s*([^"]+)"') #general fallback
|
||||
title = match1(content,r'<a.*?id\s*=\s*"%s".*?title\s*=\s*"(.+?)".*?>'%vid)
|
||||
title = match1(content, r'title">([^"]+)</p>') if not title else title
|
||||
title = match1(content, r'"title":"([^"]+)"') if not title else title
|
||||
|
Loading…
x
Reference in New Issue
Block a user