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

Authored by: coletdjnz
This commit is contained in:
coletdev 2022-03-04 20:27:09 +13:00 committed by GitHub
parent 45806d44a7
commit ded9f32667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)