[instagram] fix initialization order (#4359)
regression caused by the changes in a383eca7
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user