1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[crunchyroll] Add even more relaxed fmt fallback

This commit is contained in:
Sergey M․ 2016-04-29 19:43:53 +06:00
parent 6ff4469528
commit 8312b1a3d1
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -314,7 +314,10 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
continue continue
available_fmts.append(fmt) available_fmts.append(fmt)
if not available_fmts: if not available_fmts:
available_fmts = re.findall(r'token="showmedia\.([0-9]{3,4})p"', webpage) for p in (r'token=["\']showmedia\.([0-9]{3,4})p"', r'showmedia\.([0-9]{3,4})p'):
available_fmts = re.findall(p, webpage)
if available_fmts:
break
video_encode_ids = [] video_encode_ids = []
formats = [] formats = []
for fmt in available_fmts: for fmt in available_fmts: