mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 08:35:32 +00:00
[extractors] Use new framework for existing embeds (#4307)
`Brightcove` is difficult to migrate because it's subclasses may depend on the signature of the current functions. So it is left as-is for now Note: Tests have not been migrated
This commit is contained in:
@ -8,12 +8,6 @@ from ..compat import compat_urlparse
|
||||
class TuneInBaseIE(InfoExtractor):
|
||||
_API_BASE_URL = 'http://tunein.com/tuner/tune/'
|
||||
|
||||
@staticmethod
|
||||
def _extract_urls(webpage):
|
||||
return re.findall(
|
||||
r'<iframe[^>]+src=["\'](?P<url>(?:https?://)?tunein\.com/embed/player/[pst]\d+)',
|
||||
webpage)
|
||||
|
||||
def _real_extract(self, url):
|
||||
content_id = self._match_id(url)
|
||||
|
||||
@ -86,6 +80,7 @@ class TuneInClipIE(TuneInBaseIE):
|
||||
class TuneInStationIE(TuneInBaseIE):
|
||||
IE_NAME = 'tunein:station'
|
||||
_VALID_URL = r'https?://(?:www\.)?tunein\.com/(?:radio/.*?-s|station/.*?StationId=|embed/player/s)(?P<id>\d+)'
|
||||
_EMBED_REGEX = [r'<iframe[^>]+src=["\'](?P<url>(?:https?://)?tunein\.com/embed/player/[pst]\d+)']
|
||||
_API_URL_QUERY = '?tuneType=Station&stationId=%s'
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user