[yandexmusic] Add support for music.yandex.com (closes #27425)
authorSergey M․ <dstftw@gmail.com>
Mon, 14 Dec 2020 05:48:12 +0000 (12:48 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 14 Dec 2020 05:48:12 +0000 (12:48 +0700)
youtube_dl/extractor/yandexmusic.py

index 1d968454a73e26ae50f46d93eb184a2bbcb88ba2..b646328364b1f5fc72be76672170e1eb1d713640 100644 (file)
@@ -15,7 +15,7 @@ from ..utils import (
 
 
 class YandexMusicBaseIE(InfoExtractor):
-    _VALID_URL_BASE = r'https?://music\.yandex\.(?P<tld>ru|kz|ua|by)'
+    _VALID_URL_BASE = r'https?://music\.yandex\.(?P<tld>ru|kz|ua|by|com)'
 
     @staticmethod
     def _handle_error(response):
@@ -102,6 +102,9 @@ class YandexMusicTrackIE(YandexMusicBaseIE):
             'track_number': 9,
         },
         # 'skip': 'Travis CI servers blocked by YandexMusic',
+    }, {
+        'url': 'http://music.yandex.com/album/540508/track/4878838',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):