mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 22:17:14 +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')
|
||||
|
||||
# Look for embedded YouTube player
|
||||
mobj = re.search(
|
||||
r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?youtube.com/embed/.+?)\1', webpage)
|
||||
mobj = re.findall(
|
||||
r'<iframe[^>]+?src=(["\'])(?P<url>(https?:)?//(?:www\.)?youtube.com/embed/.+?)\1', webpage)
|
||||
if mobj:
|
||||
surl = unescapeHTML(mobj.group(u'url'))
|
||||
return self.url_result(surl, 'Youtube')
|
||||
#surl = unescapeHTML(mobj.group(u'url'))
|
||||
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
|
||||
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'
|
||||
_VALID_URL = r"""^
|
||||
(
|
||||
(?:https?://)? # http(s):// (optional)
|
||||
(?:(?:(?:(?:\w+\.)?youtube(?:-nocookie)?\.com/|
|
||||
(?:https?:)? # http(s):// (optional)
|
||||
(?:(?:(?:(?://\w+\.)?youtube(?:-nocookie)?\.com/|
|
||||
tube\.majestyc\.net/|
|
||||
youtube\.googleapis\.com/) # the various hostnames, with wildcard subdomains
|
||||
(?:.*?\#/)? # handle anchor (#/) redirect urls
|
||||
|
Loading…
x
Reference in New Issue
Block a user