-# coding: utf-8
-
import itertools
import hashlib
import json
_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),
if nodes:
return self.playlist_result(
self._extract_nodes(nodes, True), video_id,
- format_field(username, template='Post by %s'), description)
+ format_field(username, None, 'Post by %s'), description)
video_url = self._og_search_video_url(webpage, secure=False)