Skip to content

A feature-rich command-line audio/video downloader

[extractor] Support `--mark-watched` without `_NETRC_MACHINE` (#2939)

coletdevded9f32667d7
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index d8bb211370..53b21ece65 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -3678,7 +3678,7 @@ class InfoExtractor(object):
def mark_watched(self, *args, **kwargs):
if not self.get_param('mark_watched', False):
return
- if (self._get_login_info()[0] is not None
+ if (hasattr(self, '_NETRC_MACHINE') and self._get_login_info()[0] is not None
or self.get_param('cookiefile')
or self.get_param('cookiesfrombrowser')):
self._mark_watched(*args, **kwargs)