[instagram] use REST API by default

regardless of logged in status
This commit is contained in:
Mike Fährmann
2022-11-17 17:15:38 +01:00
parent 6e08ad26f7
commit 6379157543
3 changed files with 7 additions and 12 deletions

View File

@@ -44,14 +44,10 @@ class InstagramExtractor(Extractor):
def items(self):
self.login()
api = self.config("api")
if api is None or api == "auto":
api = InstagramRestAPI if self._logged_in else InstagramGraphqlAPI
elif api == "graphql":
api = InstagramGraphqlAPI
if self.config("api") == "graphql":
self.api = InstagramGraphqlAPI(self)
else:
api = InstagramRestAPI
self.api = api(self)
self.api = InstagramRestAPI(self)
data = self.metadata()
videos = self.config("videos", True)