diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-21 10:37:24 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-21 10:37:24 +0530 |
commit | 8c54a3051df902ab734d76e6bd037c685e835282 (patch) | |
tree | 92fd4aed20e62abdc974039d521fcf294ebeaeaf | |
parent | c32b0aab8a1ac1498ad474559cb097d4927d8324 (diff) | |
download | hypervideo-pre-8c54a3051df902ab734d76e6bd037c685e835282.tar.lz hypervideo-pre-8c54a3051df902ab734d76e6bd037c685e835282.tar.xz hypervideo-pre-8c54a3051df902ab734d76e6bd037c685e835282.zip |
[youtube] Bugfix in `_extract_ytcfg`
-rw-r--r-- | yt_dlp/extractor/youtube.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 940f3def2..eaa2db1da 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -356,6 +356,8 @@ class YoutubeBaseInfoExtractor(InfoExtractor): return data.get('DELEGATED_SESSION_ID') def _extract_ytcfg(self, video_id, webpage): + if not webpage: + return {} return self._parse_json( self._search_regex( r'ytcfg\.set\s*\(\s*({.+?})\s*\)\s*;', webpage, 'ytcfg', |