mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 06:27:21 +00:00
Apply suggestions from code review
Co-authored-by: sepro <sepro@sepr0.com>
This commit is contained in:
parent
b42637c619
commit
75ea808d0a
|
@ -73,7 +73,7 @@ def _real_extract(self, url):
|
||||||
date, time = self._search_regex(
|
date, time = self._search_regex(
|
||||||
r'(?P<date>\d{4}/\d{1,2}/\d{1,2})\([月火水木金土日]\)(?P<time>\d{2}:\d{2})',
|
r'(?P<date>\d{4}/\d{1,2}/\d{1,2})\([月火水木金土日]\)(?P<time>\d{2}:\d{2})',
|
||||||
start_info, 'start_info', fatal=False, group=('date', 'time'))
|
start_info, 'start_info', fatal=False, group=('date', 'time'))
|
||||||
if all((date, time)):
|
if date and time:
|
||||||
release_timestamp_str = f'{date} {time} +09:00'
|
release_timestamp_str = f'{date} {time} +09:00'
|
||||||
release_timestamp = unified_timestamp(release_timestamp_str)
|
release_timestamp = unified_timestamp(release_timestamp_str)
|
||||||
self.raise_no_formats(f'The video will be available after {release_timestamp_str}', expected=True)
|
self.raise_no_formats(f'The video will be available after {release_timestamp_str}', expected=True)
|
||||||
|
|
|
@ -43,8 +43,7 @@ def _real_extract(self, url):
|
||||||
)
|
)
|
||||||
|
|
||||||
m3u8_url = self._search_regex(
|
m3u8_url = self._search_regex(
|
||||||
r'["\'](https://vms-api\.p\.uliza\.jp/v1/prog-index\.m3u8[^"\']+)', player_data,
|
r'["\'](https://vms-api\.p\.uliza\.jp/v1/prog-index\.m3u8[^"\']+)', player_data, 'm3u8 url')
|
||||||
'm3u8 url', default=None)
|
|
||||||
video_id = parse_qs(m3u8_url).get('ss', [display_id])[0]
|
video_id = parse_qs(m3u8_url).get('ss', [display_id])[0]
|
||||||
|
|
||||||
formats = self._extract_m3u8_formats(m3u8_url, video_id)
|
formats = self._extract_m3u8_formats(m3u8_url, video_id)
|
||||||
|
|
Loading…
Reference in a new issue