mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[instagram] use REST API by default
regardless of logged in status
This commit is contained in:
parent
6e08ad26f7
commit
6379157543
@ -1514,13 +1514,12 @@ extractor.instagram.api
|
||||
Type
|
||||
``string``
|
||||
Default
|
||||
``"auto"``
|
||||
``"rest"``
|
||||
Description
|
||||
Selects which API endpoints to use.
|
||||
|
||||
* ``"rest"``: REST API - higher-resolution media, only usable when logged in
|
||||
* ``"graphql"``: GraphQL API - lower-resolution media, partially accessible when not logged in
|
||||
* ``"auto"``: Use REST API when logged in, GraphQL API otherwise
|
||||
* ``"rest"``: REST API - higher-resolution media
|
||||
* ``"graphql"``: GraphQL API - lower-resolution media
|
||||
|
||||
|
||||
extractor.instagram.include
|
||||
|
@ -159,7 +159,7 @@
|
||||
},
|
||||
"instagram":
|
||||
{
|
||||
"api": "auto",
|
||||
"api": "rest",
|
||||
"cookies": null,
|
||||
"include": "posts",
|
||||
"sleep-request": [6.0, 12.0],
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user