]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/spotify.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / spotify.py
index f476b7022c7e787724a8f27502f6039af86fe688..55ce36aeaaef9ec2fe53713967d9201f9bc5a90f 100644 (file)
@@ -16,6 +16,7 @@
 
 
 class SpotifyBaseIE(InfoExtractor):
+    _WORKING = False
     _ACCESS_TOKEN = None
     _OPERATION_HASHES = {
         'Episode': '8276d4423d709ae9b68ec1b74cc047ba0f7479059a37820be730f125189ac2bf',
@@ -23,6 +24,7 @@ class SpotifyBaseIE(InfoExtractor):
         'ShowEpisodes': 'e0e5ce27bd7748d2c59b4d44ba245a8992a05be75d6fabc3b20753fc8857444d',
     }
     _VALID_URL_TEMPL = r'https?://open\.spotify\.com/(?:embed-podcast/|embed/|)%s/(?P<id>[^/?&#]+)'
+    _EMBED_REGEX = [r'<iframe[^>]+src="(?P<url>https?://open\.spotify.com/embed/[^"]+)"']
 
     def _real_initialize(self):
         self._ACCESS_TOKEN = self._download_json(
@@ -97,12 +99,6 @@ def _extract_episode(self, episode, series):
             'series': series,
         }
 
-    @classmethod
-    def _extract_urls(cls, webpage):
-        return re.findall(
-            r'<iframe[^>]+src="(https?://open\.spotify.com/embed/[^"]+)"',
-            webpage)
-
 
 class SpotifyIE(SpotifyBaseIE):
     IE_NAME = 'spotify'