mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
[163] fix #917
This commit is contained in:
parent
9d193d7a36
commit
129695b3c6
@ -129,17 +129,10 @@ def netease_download(url, output_dir = '.', merge = True, info_only = False, **k
|
|||||||
src = r1(r'<source src="([^"]+)"', html) or r1(r'<source type="[^"]+" src="([^"]+)"', html)
|
src = r1(r'<source src="([^"]+)"', html) or r1(r'<source type="[^"]+" src="([^"]+)"', html)
|
||||||
|
|
||||||
if src:
|
if src:
|
||||||
sd_url = r1(r'(.+)-mobile.mp4', src) + ".flv"
|
url = src
|
||||||
_, _, sd_size = url_info(sd_url)
|
_, ext, size = url_info(src)
|
||||||
|
#sd_url = r1(r'(.+)-mobile.mp4', src) + ".flv"
|
||||||
hd_url = re.sub('/SD/', '/HD/', sd_url)
|
#hd_url = re.sub('/SD/', '/HD/', sd_url)
|
||||||
_, _, hd_size = url_info(hd_url)
|
|
||||||
|
|
||||||
if hd_size > sd_size:
|
|
||||||
url, size = hd_url, hd_size
|
|
||||||
else:
|
|
||||||
url, size = sd_url, sd_size
|
|
||||||
ext = 'flv'
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
url = (r1(r'["\'](.+)-list.m3u8["\']', html) or r1(r'["\'](.+).m3u8["\']', html)) + ".mp4"
|
url = (r1(r'["\'](.+)-list.m3u8["\']', html) or r1(r'["\'](.+).m3u8["\']', html)) + ".mp4"
|
||||||
|
Loading…
Reference in New Issue
Block a user