diff options
Diffstat (limited to 'yt_dlp/extractor')
-rw-r--r-- | yt_dlp/extractor/common.py | 2 | ||||
-rw-r--r-- | yt_dlp/extractor/youtube.py | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index c76133d8f..02a4c6cec 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -509,7 +509,7 @@ class InfoExtractor: 'password': f'Use {password_hint}', 'cookies': ( 'Use --cookies-from-browser or --cookies for the authentication. ' - 'See https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl for how to manually pass cookies'), + 'See https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp for how to manually pass cookies'), }[method if method is not NO_DEFAULT else 'any' if self.supports_login() else 'cookies'] def __init__(self, downloader=None): diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 4a5d6805e..3ca189e44 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3336,10 +3336,15 @@ class YoutubeIE(YoutubeBaseInfoExtractor): if isinstance(e, JSInterpreter.Exception): phantomjs_hint = (f' Install {self._downloader._format_err("PhantomJS", self._downloader.Styles.EMPHASIS)} ' f'to workaround the issue. {PhantomJSwrapper.INSTALL_HINT}\n') - self.report_warning( - f'nsig extraction failed: You may experience throttling for some formats\n{phantomjs_hint}' - f' n = {query["n"][0]} ; player = {player_url}', video_id=video_id, only_once=True) - self.write_debug(e, only_once=True) + if player_url: + self.report_warning( + f'nsig extraction failed: You may experience throttling for some formats\n{phantomjs_hint}' + f' n = {query["n"][0]} ; player = {player_url}', video_id=video_id, only_once=True) + self.write_debug(e, only_once=True) + else: + self.report_warning( + 'Cannot decrypt nsig without player_url: You may experience throttling for some formats', + video_id=video_id, only_once=True) throttled = True if itag: |