mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-30 20:34:40 +01:00
[youtube] Bugfix in _extract_ytcfg
This commit is contained in:
parent
c32b0aab8a
commit
8c54a3051d
1 changed files with 2 additions and 0 deletions
|
@ -356,6 +356,8 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
||||||
return data.get('DELEGATED_SESSION_ID')
|
return data.get('DELEGATED_SESSION_ID')
|
||||||
|
|
||||||
def _extract_ytcfg(self, video_id, webpage):
|
def _extract_ytcfg(self, video_id, webpage):
|
||||||
|
if not webpage:
|
||||||
|
return {}
|
||||||
return self._parse_json(
|
return self._parse_json(
|
||||||
self._search_regex(
|
self._search_regex(
|
||||||
r'ytcfg\.set\s*\(\s*({.+?})\s*\)\s*;', webpage, 'ytcfg',
|
r'ytcfg\.set\s*\(\s*({.+?})\s*\)\s*;', webpage, 'ytcfg',
|
||||||
|
|
Loading…
Add table
Reference in a new issue