mirror of https://github.com/yt-dlp/yt-dlp.git
[ie/radiko] Extract unique `id` values (#10726)
Authored by: garret1317
This commit is contained in:
parent
a7d3235c84
commit
c8d096c5ce
|
@ -7,6 +7,7 @@ from .common import InfoExtractor
|
|||
from ..utils import (
|
||||
ExtractorError,
|
||||
clean_html,
|
||||
join_nonempty,
|
||||
time_seconds,
|
||||
try_call,
|
||||
unified_timestamp,
|
||||
|
@ -167,7 +168,7 @@ class RadikoBaseIE(InfoExtractor):
|
|||
|
||||
|
||||
class RadikoIE(RadikoBaseIE):
|
||||
_VALID_URL = r'https?://(?:www\.)?radiko\.jp/#!/ts/(?P<station>[A-Z0-9-]+)/(?P<id>\d+)'
|
||||
_VALID_URL = r'https?://(?:www\.)?radiko\.jp/#!/ts/(?P<station>[A-Z0-9-]+)/(?P<timestring>\d+)'
|
||||
|
||||
_TESTS = [{
|
||||
# QRR (文化放送) station provides <desc>
|
||||
|
@ -183,8 +184,9 @@ class RadikoIE(RadikoBaseIE):
|
|||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
station, video_id = self._match_valid_url(url).groups()
|
||||
vid_int = unified_timestamp(video_id, False)
|
||||
station, timestring = self._match_valid_url(url).group('station', 'timestring')
|
||||
video_id = join_nonempty(station, timestring)
|
||||
vid_int = unified_timestamp(timestring, False)
|
||||
prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, vid_int)
|
||||
|
||||
auth_token, area_id = self._auth_client()
|
||||
|
@ -207,7 +209,7 @@ class RadikoIE(RadikoBaseIE):
|
|||
'ft': radio_begin,
|
||||
'end_at': radio_end,
|
||||
'to': radio_end,
|
||||
'seek': video_id,
|
||||
'seek': timestring,
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue