|
|
@ -2132,15 +2132,18 @@ class InfoExtractor(object):
|
|
|
|
return is_plain_url, formats
|
|
|
|
return is_plain_url, formats
|
|
|
|
|
|
|
|
|
|
|
|
entries = []
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
# amp-video and amp-audio are very similar to their HTML5 counterparts
|
|
|
|
|
|
|
|
# so we wll include them right here (see
|
|
|
|
|
|
|
|
# https://www.ampproject.org/docs/reference/components/amp-video)
|
|
|
|
media_tags = [(media_tag, media_type, '')
|
|
|
|
media_tags = [(media_tag, media_type, '')
|
|
|
|
for media_tag, media_type
|
|
|
|
for media_tag, media_type
|
|
|
|
in re.findall(r'(?s)(<(video|audio)[^>]*/>)', webpage)]
|
|
|
|
in re.findall(r'(?s)(<(?:amp-)?(video|audio)[^>]*/>)', webpage)]
|
|
|
|
media_tags.extend(re.findall(
|
|
|
|
media_tags.extend(re.findall(
|
|
|
|
# We only allow video|audio followed by a whitespace or '>'.
|
|
|
|
# We only allow video|audio followed by a whitespace or '>'.
|
|
|
|
# Allowing more characters may end up in significant slow down (see
|
|
|
|
# Allowing more characters may end up in significant slow down (see
|
|
|
|
# https://github.com/rg3/youtube-dl/issues/11979, example URL:
|
|
|
|
# https://github.com/rg3/youtube-dl/issues/11979, example URL:
|
|
|
|
# http://www.porntrex.com/maps/videositemap.xml).
|
|
|
|
# http://www.porntrex.com/maps/videositemap.xml).
|
|
|
|
r'(?s)(<(?P<tag>video|audio)(?:\s+[^>]*)?>)(.*?)</(?P=tag)>', webpage))
|
|
|
|
r'(?s)(<(?P<tag>(?:amp-)?(?:video|audio))(?:\s+[^>]*)?>)(.*?)</(?P=tag)>', webpage))
|
|
|
|
for media_tag, media_type, media_content in media_tags:
|
|
|
|
for media_tag, media_type, media_content in media_tags:
|
|
|
|
media_info = {
|
|
|
|
media_info = {
|
|
|
|
'formats': [],
|
|
|
|
'formats': [],
|
|
|
|