mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-10 22:43:17 +08:00
[generic] As a last resort, look for anything that may be a media URL
This commit is contained in:
parent
f5e6c21080
commit
af48543966
@ -1816,6 +1816,11 @@ class GenericIE(InfoExtractor):
|
||||
'_type': 'url',
|
||||
'url': new_url,
|
||||
}
|
||||
if not found:
|
||||
# Last resort: just look for anything that looks like a media URL
|
||||
found = set(re.findall(
|
||||
r'\b((?:https?:)?//[A-Za-z0-9.:[\]]+/[A-Za-z0-9\-\._~:/()*+,;=%]+\.(?:mp3|mp4|flv|m3u8|smil)(?:\?[A-Za-z0-9\-\._~:/[\]()*+,;=%]*)?)\b',
|
||||
webpage))
|
||||
if not found:
|
||||
raise UnsupportedError(url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user