[instagram] fix initialization order (#4359)

regression caused by the changes in a383eca7
pull/4403/head
Mike Fährmann 1 year ago
parent 7eab101144
commit 2bcf0a4c49
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -36,6 +36,13 @@ class InstagramExtractor(Extractor):
self.item = match.group(1)
def _init(self):
self.www_claim = "0"
self.csrf_token = util.generate_token()
self._find_tags = re.compile(r"#\w+").findall
self._logged_in = True
self._cursor = None
self._user = None
self.cookies.set(
"csrftoken", self.csrf_token, domain=self.cookies_domain)
@ -44,13 +51,6 @@ class InstagramExtractor(Extractor):
else:
self.api = InstagramRestAPI(self)
self.www_claim = "0"
self.csrf_token = util.generate_token()
self._find_tags = re.compile(r"#\w+").findall
self._logged_in = True
self._cursor = None
self._user = None
def items(self):
self.login()

Loading…
Cancel
Save