mirror of https://github.com/yt-dlp/yt-dlp.git
better words
This commit is contained in:
parent
f2821be22b
commit
696bf76b8b
|
@ -54,7 +54,7 @@ class RadikoBaseIE(InfoExtractor):
|
||||||
raise ExtractorError('Invalid username and/or password', expected=True)
|
raise ExtractorError('Invalid username and/or password', expected=True)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def _check_account(self):
|
def _check_tf30(self):
|
||||||
if self._has_tf30 is not None:
|
if self._has_tf30 is not None:
|
||||||
return self._has_tf30
|
return self._has_tf30
|
||||||
if self._get_cookies('https://radiko.jp').get('radiko_session') is None:
|
if self._get_cookies('https://radiko.jp').get('radiko_session') is None:
|
||||||
|
@ -145,13 +145,13 @@ class RadikoBaseIE(InfoExtractor):
|
||||||
|
|
||||||
if broadcast_day_end + datetime.timedelta(days=30) < now:
|
if broadcast_day_end + datetime.timedelta(days=30) < now:
|
||||||
self.raise_no_formats('Programme is no longer available.', video_id=video_id, expected=True)
|
self.raise_no_formats('Programme is no longer available.', video_id=video_id, expected=True)
|
||||||
elif broadcast_day_end + datetime.timedelta(days=7) < now and not self._check_account():
|
elif broadcast_day_end + datetime.timedelta(days=7) < now and not self._check_tf30():
|
||||||
self.raise_login_required('Programme is only available with a Timefree 30 subscription',
|
self.raise_login_required('Programme is only available with a Timefree 30 subscription',
|
||||||
metadata_available=True)
|
metadata_available=True)
|
||||||
|
|
||||||
station_program = self._download_xml(
|
station_program = self._download_xml(
|
||||||
f'https://api.radiko.jp/program/v3/date/{broadcast_day_str}/station/{station}.xml', station,
|
f'https://api.radiko.jp/program/v3/date/{broadcast_day_str}/station/{station}.xml', station,
|
||||||
note=f'Downloading programme data for {broadcast_day_str}')
|
note=f'Downloading programme information for {broadcast_day_str}')
|
||||||
|
|
||||||
prog = None
|
prog = None
|
||||||
for p in station_program.findall('.//prog'):
|
for p in station_program.findall('.//prog'):
|
||||||
|
|
Loading…
Reference in New Issue