mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 01:02:13 +01:00
Apply suggestions from code review
Co-authored-by: sepro <sepro@sepr0.com>
This commit is contained in:
parent
8b6ccef342
commit
41694a516a
1 changed files with 2 additions and 1 deletions
|
@ -84,7 +84,8 @@ def _real_extract(self, url):
|
||||||
video_id, display_id = self._match_valid_url(url).groups()
|
video_id, display_id = self._match_valid_url(url).groups()
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
video_id_dec = self._search_regex(r'\bvId\s*=\s*(\d+)', webpage, 'video id') or str(int(video_id, 16))
|
video_id_dec = self._search_regex(
|
||||||
|
r'\bvId\s*=\s*(\d+)', webpage, 'video id', fatal=False) or str(int(video_id, 16))
|
||||||
video_exp = self._search_regex(r'\bvEx\s*=\s*["\'](\d+)', webpage, 'video expiry')
|
video_exp = self._search_regex(r'\bvEx\s*=\s*["\'](\d+)', webpage, 'video expiry')
|
||||||
video_hashes = self._search_json(
|
video_hashes = self._search_json(
|
||||||
r'\bvHash\s*=', webpage, 'video hashes', video_id,
|
r'\bvHash\s*=', webpage, 'video hashes', video_id,
|
||||||
|
|
Loading…
Reference in a new issue