mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-14 01:07:17 +08:00
support for list of embeded yourtube urls
This commit is contained in:
parent
a86adcc6f1
commit
4a6899bc22
@ -177,11 +177,13 @@ class GenericIE(InfoExtractor):
|
|||||||
return self.url_result(surl, 'Vimeo')
|
return self.url_result(surl, 'Vimeo')
|
||||||
|
|
||||||
# Look for embedded YouTube player
|
# Look for embedded YouTube player
|
||||||
mobj = re.search(
|
mobj = re.findall(
|
||||||
r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?youtube.com/embed/.+?)\1', webpage)
|
r'<iframe[^>]+?src=(["\'])(?P<url>(https?:)?//(?:www\.)?youtube.com/embed/.+?)\1', webpage)
|
||||||
if mobj:
|
if mobj:
|
||||||
surl = unescapeHTML(mobj.group(u'url'))
|
#surl = unescapeHTML(mobj.group(u'url'))
|
||||||
return self.url_result(surl, 'Youtube')
|
surl_list = [tuppl[1] for tuppl in mobj]
|
||||||
|
return [self.url_result(x, 'Youtube') for x in surl_list]
|
||||||
|
|
||||||
|
|
||||||
# Look for Bandcamp pages with custom domain
|
# Look for Bandcamp pages with custom domain
|
||||||
mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
|
mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
|
||||||
|
@ -141,8 +141,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
|||||||
IE_DESC = u'YouTube.com'
|
IE_DESC = u'YouTube.com'
|
||||||
_VALID_URL = r"""^
|
_VALID_URL = r"""^
|
||||||
(
|
(
|
||||||
(?:https?://)? # http(s):// (optional)
|
(?:https?:)? # http(s):// (optional)
|
||||||
(?:(?:(?:(?:\w+\.)?youtube(?:-nocookie)?\.com/|
|
(?:(?:(?:(?://\w+\.)?youtube(?:-nocookie)?\.com/|
|
||||||
tube\.majestyc\.net/|
|
tube\.majestyc\.net/|
|
||||||
youtube\.googleapis\.com/) # the various hostnames, with wildcard subdomains
|
youtube\.googleapis\.com/) # the various hostnames, with wildcard subdomains
|
||||||
(?:.*?\#/)? # handle anchor (#/) redirect urls
|
(?:.*?\#/)? # handle anchor (#/) redirect urls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user