mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 05:47:24 +01:00
better words
This commit is contained in:
parent
f2821be22b
commit
696bf76b8b
@ -54,7 +54,7 @@ def _perform_login(self, username, password):
|
|||||||
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 @@ def _find_program(self, video_id, station, cursor):
|
|||||||
|
|
||||||
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
Block a user