_NETRC_MACHINE = 'instagram'
_IS_LOGGED_IN = False
- def _login(self):
- username, password = self._get_login_info()
- if username is None or self._IS_LOGGED_IN:
+ def _perform_login(self, username, password):
+ if self._IS_LOGGED_IN:
return
login_webpage = self._download_webpage(
raise ExtractorError('Unable to login')
InstagramBaseIE._IS_LOGGED_IN = True
- def _real_initialize(self):
- self._login()
-
def _get_count(self, media, kind, *keys):
return traverse_obj(
media, (kind, 'count'), *((f'edge_media_{key}', 'count') for key in keys),