mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-08-15 17:08:29 +00:00
TuneInStationIE
This commit is contained in:
parent
66556b4902
commit
e5f341e752
@ -1408,16 +1408,6 @@ class GenericIE(InfoExtractor):
|
|||||||
'view_count': int,
|
'view_count': int,
|
||||||
},
|
},
|
||||||
'params': {'skip_download': 'm3u8'},
|
'params': {'skip_download': 'm3u8'},
|
||||||
}, {
|
|
||||||
# 🔍104
|
|
||||||
# TuneInStationIE
|
|
||||||
'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '204146',
|
|
||||||
'ext': 'mp3',
|
|
||||||
'title': 'CNRV',
|
|
||||||
},
|
|
||||||
'skip': 'Invalid URL',
|
|
||||||
}, {
|
}, {
|
||||||
# ✅124
|
# ✅124
|
||||||
# YoutubeIE
|
# YoutubeIE
|
||||||
|
@ -51,9 +51,9 @@ class TuneInStationIE(TuneInBaseIE):
|
|||||||
'url': 'https://tunein.com/radio/Jazz24-885-s34682/',
|
'url': 'https://tunein.com/radio/Jazz24-885-s34682/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 's34682',
|
'id': 's34682',
|
||||||
'title': 're:^Jazz24',
|
'title': str,
|
||||||
'description': 'md5:d6d0b89063fd68d529fa7058ee98619b',
|
'description': 'md5:d6d0b89063fd68d529fa7058ee98619b',
|
||||||
'thumbnail': 're:^https?://[^?&]+/s34682',
|
'thumbnail': r're:https?://cdn-profiles\.tunein\.com/.+',
|
||||||
'location': 'Seattle-Tacoma, US',
|
'location': 'Seattle-Tacoma, US',
|
||||||
'ext': 'mp3',
|
'ext': 'mp3',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
@ -68,17 +68,26 @@ class TuneInStationIE(TuneInBaseIE):
|
|||||||
'url': 'https://tunein.com/radio/BBC-Radio-1-988-s24939/',
|
'url': 'https://tunein.com/radio/BBC-Radio-1-988-s24939/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 's24939',
|
'id': 's24939',
|
||||||
'title': 're:^BBC Radio 1',
|
'title': str,
|
||||||
'description': 'md5:f3f75f7423398d87119043c26e7bfb84',
|
'description': 'md5:ee2c56794844610d045f8caf5ff34d0c',
|
||||||
'thumbnail': 're:^https?://[^?&]+/s24939',
|
'thumbnail': r're:https?://cdn-profiles\.tunein\.com/.+',
|
||||||
'location': 'London, UK',
|
'location': 'London, UK',
|
||||||
'ext': 'mp3',
|
'ext': 'm4a',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
_WEBPAGE_TESTS = [{
|
||||||
|
'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '204146',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'title': 'CNRV',
|
||||||
|
},
|
||||||
|
'skip': 'Invalid URL',
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
station_id = self._match_id(url)
|
station_id = self._match_id(url)
|
||||||
@ -123,9 +132,9 @@ class TuneInPodcastIE(TuneInBaseIE):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'p14',
|
'id': 'p14',
|
||||||
'title': 'BBC News',
|
'title': 'BBC News',
|
||||||
'description': 'md5:1218e575eeaff75f48ed978261fa2068',
|
'description': 'md5:30b9622bcc4bd101d4acd6f38f284aed',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 200,
|
'playlist_mincount': 36,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
_PAGE_SIZE = 30
|
_PAGE_SIZE = 30
|
||||||
@ -164,9 +173,9 @@ class TuneInPodcastEpisodeIE(TuneInBaseIE):
|
|||||||
'url': 'https://tunein.com/podcasts/Technology-Podcasts/Artificial-Intelligence-p1153019/?topicId=236404354',
|
'url': 'https://tunein.com/podcasts/Technology-Podcasts/Artificial-Intelligence-p1153019/?topicId=236404354',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 't236404354',
|
'id': 't236404354',
|
||||||
'title': '#351 \u2013 MrBeast: Future of YouTube, Twitter, TikTok, and Instagram',
|
'title': '#351 – MrBeast: Future of YouTube, Twitter, TikTok, and Instagram',
|
||||||
'description': 'md5:e1734db6f525e472c0c290d124a2ad77',
|
'description': 'md5:2784533b98f8ac45c0820b1e4a8d8bb2',
|
||||||
'thumbnail': 're:^https?://[^?&]+/p1153019',
|
'thumbnail': r're:https?://cdn-profiles\.tunein\.com/.+',
|
||||||
'timestamp': 1673458571,
|
'timestamp': 1673458571,
|
||||||
'upload_date': '20230111',
|
'upload_date': '20230111',
|
||||||
'series_id': 'p1153019',
|
'series_id': 'p1153019',
|
||||||
@ -198,18 +207,19 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
|
|
||||||
class TuneInShortenerIE(InfoExtractor):
|
class TuneInShortenerIE(InfoExtractor):
|
||||||
|
_WORKING = False
|
||||||
IE_NAME = 'tunein:shortener'
|
IE_NAME = 'tunein:shortener'
|
||||||
IE_DESC = False # Do not list
|
IE_DESC = False # Do not list
|
||||||
_VALID_URL = r'https?://tun\.in/(?P<id>[A-Za-z0-9]+)'
|
_VALID_URL = r'https?://tun\.in/(?P<id>[A-Za-z0-9]+)'
|
||||||
|
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
# test redirection
|
# test redirection
|
||||||
'url': 'http://tun.in/ser7s',
|
'url': 'http://tun.in/ser7s',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 's34682',
|
'id': 's34682',
|
||||||
'title': 're:^Jazz24',
|
'title': str,
|
||||||
'description': 'md5:d6d0b89063fd68d529fa7058ee98619b',
|
'description': 'md5:d6d0b89063fd68d529fa7058ee98619b',
|
||||||
'thumbnail': 're:^https?://[^?&]+/s34682',
|
'thumbnail': r're:https?://cdn-profiles\.tunein\.com/.+',
|
||||||
'location': 'Seattle-Tacoma, US',
|
'location': 'Seattle-Tacoma, US',
|
||||||
'ext': 'mp3',
|
'ext': 'mp3',
|
||||||
'live_status': 'is_live',
|
'live_status': 'is_live',
|
||||||
@ -217,7 +227,7 @@ class TuneInShortenerIE(InfoExtractor):
|
|||||||
'params': {
|
'params': {
|
||||||
'skip_download': True, # live stream
|
'skip_download': True, # live stream
|
||||||
},
|
},
|
||||||
}
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
redirect_id = self._match_id(url)
|
redirect_id = self._match_id(url)
|
||||||
@ -228,7 +238,7 @@ def _real_extract(self, url):
|
|||||||
url = urlh.url
|
url = urlh.url
|
||||||
url_parsed = urllib.parse.urlparse(url)
|
url_parsed = urllib.parse.urlparse(url)
|
||||||
if url_parsed.port == 443:
|
if url_parsed.port == 443:
|
||||||
url = url_parsed._replace(netloc=url_parsed.hostname).url
|
url = url_parsed._replace(netloc=url_parsed.hostname).url # XXX: should call geturl() here
|
||||||
|
|
||||||
self.to_screen(f'Following redirect: {url}')
|
self.to_screen(f'Following redirect: {url}')
|
||||||
return self.url_result(url)
|
return self.url_result(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user