Skip to content

Commit

Permalink
[instagram] update API headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Sep 21, 2022
1 parent 4b2a006 commit 3dacfb3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions gallery_dl/extractor/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ def request(self, url, **kwargs):
def _request_api(self, endpoint, **kwargs):
url = "https://i.instagram.com/api" + endpoint
kwargs["headers"] = {
"X-CSRFToken" : self.csrf_token,
"X-IG-App-ID" : "936619743392459",
"X-IG-WWW-Claim": self.www_claim,
"X-CSRFToken" : self.csrf_token,
"X-Instagram-AJAX": "1006242110",
"X-IG-App-ID" : "936619743392459",
"X-ASBD-ID" : "198387",
"X-IG-WWW-Claim" : self.www_claim,
"Origin" : self.root,
"Referer" : self.root + "/",
}
kwargs["cookies"] = {
"csrftoken": self.csrf_token,
Expand All @@ -127,9 +131,12 @@ def _request_graphql(self, query_hash, variables):
}
headers = {
"X-CSRFToken" : self.csrf_token,
"X-Instagram-AJAX": "1006242110",
"X-IG-App-ID" : "936619743392459",
"X-ASBD-ID" : "198387",
"X-IG-WWW-Claim" : self.www_claim,
"X-Requested-With": "XMLHttpRequest",
"Referer" : self.root + "/",
}
cookies = {
"csrftoken": self.csrf_token,
Expand Down

0 comments on commit 3dacfb3

Please sign in to comment.