aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <blackjack4494@web.de>2020-11-07 15:05:14 +0100
committerUnknown <blackjack4494@web.de>2020-11-07 15:05:14 +0100
commit7d94c0674398da7aa026c920a1512589fcb3dbf0 (patch)
tree58e562abfbbfacac642320429cc557e79a8f9559
parent5db4014b2367317fc6875aeb8fddc374b5225074 (diff)
parentadb118da2667522babf2b849a7ad1f5c44b8873b (diff)
downloadhypervideo-pre-7d94c0674398da7aa026c920a1512589fcb3dbf0.tar.lz
hypervideo-pre-7d94c0674398da7aa026c920a1512589fcb3dbf0.tar.xz
hypervideo-pre-7d94c0674398da7aa026c920a1512589fcb3dbf0.zip
Merge remote-tracking branch 'origin/master'
-rw-r--r--youtube_dlc/extractor/la7.py3
-rw-r--r--youtube_dlc/extractor/youtube.py14
2 files changed, 15 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/la7.py b/youtube_dlc/extractor/la7.py
index f5d4564fa..74b006fb5 100644
--- a/youtube_dlc/extractor/la7.py
+++ b/youtube_dlc/extractor/la7.py
@@ -36,6 +36,9 @@ class LA7IE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
+ if not url.startswith('http'):
+ url = '%s//%s' % (self.http_scheme(), url)
+
webpage = self._download_webpage(url, video_id)
player_data = self._search_regex(
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py
index 025ea5e57..3ec2581dc 100644
--- a/youtube_dlc/extractor/youtube.py
+++ b/youtube_dlc/extractor/youtube.py
@@ -2631,6 +2631,12 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):
_VIDEO_RE_TPL = r'href="\s*/watch\?v=%s(?:&amp;(?:[^"]*?index=(?P<index>\d+))?(?:[^>]+>(?P<title>[^<]+))?)?'
_VIDEO_RE = _VIDEO_RE_TPL % r'(?P<id>[0-9A-Za-z_-]{11})'
IE_NAME = 'youtube:playlist'
+ _YTM_PLAYLIST_PREFIX = 'RDCLAK5uy_'
+ _YTM_CHANNEL_INFO = {
+ 'uploader': 'Youtube Music',
+ 'uploader_id': 'music', # or "UC-9-kyTW8ZkZNDHQJ6FgpwQ"
+ 'uploader_url': 'https://www.youtube.com/music'
+ }
_TESTS = [{
'url': 'https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc',
'info_dict': {
@@ -2940,6 +2946,8 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):
'uploader_id': uploader_id,
'uploader_url': uploader_url,
})
+ if playlist_id.startswith(self._YTM_PLAYLIST_PREFIX):
+ playlist.update(self._YTM_CHANNEL_INFO)
return has_videos, playlist
@@ -2970,8 +2978,10 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):
return video
if playlist_id.startswith(('RD', 'UL', 'PU')):
- # Mixes require a custom extraction process
- return self._extract_mix(playlist_id)
+ if not playlist_id.startswith(self._YTM_PLAYLIST_PREFIX):
+ # Mixes require a custom extraction process,
+ # Youtube Music playlists act like normal playlists (with randomized order)
+ return self._extract_mix(playlist_id)
has_videos, playlist = self._extract_playlist(playlist_id)
if has_videos or not video_id: