mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-06 02:49:35 +02:00
parent
eea1b0358e
commit
b6ce9bb038
@ -1965,6 +1965,7 @@
|
|||||||
YoutubeFavouritesIE,
|
YoutubeFavouritesIE,
|
||||||
YoutubeHistoryIE,
|
YoutubeHistoryIE,
|
||||||
YoutubeTabIE,
|
YoutubeTabIE,
|
||||||
|
YoutubeLivestreamEmbedIE,
|
||||||
YoutubePlaylistIE,
|
YoutubePlaylistIE,
|
||||||
YoutubeRecommendedIE,
|
YoutubeRecommendedIE,
|
||||||
YoutubeSearchDateIE,
|
YoutubeSearchDateIE,
|
||||||
|
@ -864,7 +864,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
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
|
||||||
(?: # the various things that can precede the ID:
|
(?: # the various things that can precede the ID:
|
||||||
(?:(?:v|embed|e|shorts)/(?!videoseries)) # v/ or embed/ or e/ or shorts/
|
(?:(?:v|embed|e|shorts)/(?!videoseries|live_stream)) # v/ or embed/ or e/ or shorts/
|
||||||
|(?: # or the v= param in all its forms
|
|(?: # or the v= param in all its forms
|
||||||
(?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)? # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
|
(?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)? # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
|
||||||
(?:\?|\#!?) # the params delimiter ? or # or #!
|
(?:\?|\#!?) # the params delimiter ? or # or #!
|
||||||
@ -5139,8 +5139,24 @@ def _real_extract(self, url):
|
|||||||
}), ie=YoutubeTabIE.ie_key(), video_id=playlist_id)
|
}), ie=YoutubeTabIE.ie_key(), video_id=playlist_id)
|
||||||
|
|
||||||
|
|
||||||
|
class YoutubeLivestreamEmbedIE(InfoExtractor):
|
||||||
|
IE_DESC = 'YouTube livestream embeds'
|
||||||
|
_VALID_URL = r'https?://(?:\w+\.)?youtube\.com/embed/live_stream/?\?(?:[^#]+&)?channel=(?P<id>[^&#]+)'
|
||||||
|
_TESTS = [{
|
||||||
|
'url': 'https://www.youtube.com/embed/live_stream?channel=UC2_KI6RB__jGdlnK6dvFEZA',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
channel_id = self._match_id(url)
|
||||||
|
return self.url_result(
|
||||||
|
f'https://www.youtube.com/channel/{channel_id}/live',
|
||||||
|
ie=YoutubeTabIE.ie_key(), video_id=channel_id)
|
||||||
|
|
||||||
|
|
||||||
class YoutubeYtUserIE(InfoExtractor):
|
class YoutubeYtUserIE(InfoExtractor):
|
||||||
IE_DESC = 'YouTube user videos; "ytuser:" prefix'
|
IE_DESC = 'YouTube user videos; "ytuser:" prefix'
|
||||||
|
IE_NAME = 'youtube:user'
|
||||||
_VALID_URL = r'ytuser:(?P<id>.+)'
|
_VALID_URL = r'ytuser:(?P<id>.+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'ytuser:phihag',
|
'url': 'ytuser:phihag',
|
||||||
|
Loading…
Reference in New Issue
Block a user