[instagram] fix initialization order (#4359)

regression caused by the changes in a383eca7
This commit is contained in:
Mike Fährmann
2023-07-28 14:25:37 +02:00
parent 7eab101144
commit 2bcf0a4c49

View File

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