]> jfr.im git - yt-dlp.git/commitdiff
[common] bugfix for when `compat_opts` is not given
authorpukkandan <redacted>
Tue, 11 May 2021 17:59:05 +0000 (23:29 +0530)
committerpukkandan <redacted>
Tue, 11 May 2021 17:59:26 +0000 (23:29 +0530)
yt_dlp/extractor/common.py

index 99695e14f474404c4882b962a916e234aa0f2d96..cd3aa52a0c04e0da46852bf49e37c0e1d0416390 100644 (file)
@@ -559,7 +559,7 @@ def extract(self, url):
                         ie_result['__x_forwarded_for_ip'] = self._x_forwarded_for_ip
                     subtitles = ie_result.get('subtitles')
                     if (subtitles and 'live_chat' in subtitles
-                            and 'no-live-chat' in self._downloader.params.get('compat_opts')):
+                            and 'no-live-chat' in self._downloader.params.get('compat_opts', [])):
                         del subtitles['live_chat']
                     return ie_result
                 except GeoRestrictedError as e: