From caf29821bb3e993f3280501ce57002de1b243483 Mon Sep 17 00:00:00 2001 From: garret Date: Tue, 13 Jun 2023 03:14:26 +0100 Subject: add SearchIE tests --- yt_dlp_plugins/extractor/radiko.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 1150531..ead6cae 100755 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -809,6 +809,31 @@ class RadikoTimeFreeIE(_RadikoBaseIE): class RadikoSearchIE(_RadikoBaseIE): _VALID_URL = r"https?://(?:www\.)?radiko\.jp/#!/search/(?:timeshift|live|history)\?" + _TESTS = [{ + # past, specific area + 'url': 'https://radiko.jp/#!/search/live?key=city%20chill%20club&filter=past&start_day=&end_day=®ion_id=&area_id=JP13&cul_area_id=JP13&page_idx=0', + 'playlist_mincount': 4, + 'info_dict': { + 'id': "city chill club-past-all-JP13", + 'title': "city chill club", + } + }, { + # all, specific day + "url": "https://radiko.jp/#!/search/live?key=CIAO%20765(7%E6%99%82%E5%8F%B0)&filter=&start_day=2023-06-12&end_day=2023-06-12®ion_id=all&area_id=JP13&cul_area_id=JP13&page_idx=0", + "playlist_mincount": 1, + "info_dict": { + "id": "CIAO 765(7時台)-all-2023-06-12-all", + "title": "CIAO 765(7時台)", + } + }, { + # all, live/future + "url": "https://radiko.jp/#!/search/live?key=%EF%BC%AE%EF%BC%A8%EF%BC%AB%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B9&filter=future&start_day=&end_day=®ion_id=all&area_id=JP13&cul_area_id=JP13&page_idx=0", + "playlist_mincount": 8, + "info_dict": { + "id": "NHKニュース-future-all-all", + "title": "NHKニュース", + }, + }] def _strip_date(self, date): return date.replace(" ", "").replace("-", "").replace(":", "") -- cgit v1.2.3-70-g09d2