1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 14:45:42 +07:00

[spotify] Detect iframe embeds (#3430)

Authored by: fstirlitz
This commit is contained in:
Felix S
2022-04-14 13:22:47 +00:00
committed by GitHub
parent cda1bc5197
commit a49e777d59
2 changed files with 18 additions and 3 deletions

View File

@@ -67,6 +67,7 @@
from .soundcloud import SoundcloudEmbedIE
from .spankwire import SpankwireIE
from .sportbox import SportBoxIE
from .spotify import SpotifyBaseIE
from .springboardplatform import SpringboardPlatformIE
from .svt import SVTIE
from .teachable import TeachableIE
@@ -3164,6 +3165,11 @@ def _real_extract(self, url):
if sportbox_urls:
return self.playlist_from_matches(sportbox_urls, video_id, video_title, ie=SportBoxIE.ie_key())
# Look for embedded Spotify player
spotify_urls = SpotifyBaseIE._extract_embed_urls(webpage)
if spotify_urls:
return self.playlist_from_matches(spotify_urls, video_id, video_title)
# Look for embedded XHamster player
xhamster_urls = XHamsterEmbedIE._extract_urls(webpage)
if xhamster_urls: