mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

"[instagram][error] user's posts are private" after follow request accepted #3015

Closed fragrantfungus closed 2 years ago

fragrantfungus commented 2 years ago

I'm using gallery-dl version 1.23.3-dev and also tested with the latest release version

target profile is set to private by default

my instagram account has viewing privileges of the target profile after my follow request was accepted

target profile remains inaccessible when using gallery-dl: "[instagram][error] user's posts are private"

edit: no issues downloading from instagram profiles that are public by default (including NSFW profiles). the issue is specifically instagram profiles that are private by default

tried --clear-cache and relogging to my instagram account

I tried loading gallery-dl with my browser cookies file, which allowed me to download posts from the private profile. unfortunately, using my browser cookies also resizes the images, stretching them bigger than the 1080 pixels width limit imposed by instagram, which results in upscaling artifacts.

[gallery-dl][debug] Version 1.23.3-dev [gallery-dl][debug] Python 3.9.7 - Windows-10-10.0.19044-SP0 [gallery-dl][debug] requests 2.26.0 - urllib3 1.26.6 [gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/user/' [instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/user/' [instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/user/posts/' [urllib3.connectionpool][debug] Starting new HTTPS connection (1): i.instagram.com:443 [urllib3.connectionpool][debug] https://i.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=user HTTP/1.1" 200 1450 [instagram][error] user's posts are private

mikf commented 2 years ago

Probably the same problem as #3011 and most likely due to username & password login not catching all cookies.

The "[instagram][error] user's posts are private" error got re-added quite recently in fce66426 and check for a private profile and your account following that profile. Maybe that's the wring approach?

stretching them bigger than the 1080 pixels width limit imposed by instagram, which results in upscaling artifacts.

Are you sure they are actually upscaled and not a higher-resolution version of the 1080 pixel ones? (#2666)

If you really want the smaller versions, you can try forcing the GraphQL API endpoints (might be buggy): -o api=graphql

fragrantfungus commented 2 years ago

my understanding was that instagram does not save the higher resolution images uploaded by the user, and that any image we extract that is bigger than 1080 is simply a resized / stretched copy of the 1080 pixel versions. I'm really not sure though

mikf commented 2 years ago

The metadata for https://www.instagram.com/p/CejXi9LLCgx/ says

      "original_width": 1440,
      "original_height": 1800,

(from https://i.instagram.com/api/v1/media/2856230145900685361/info/)

so I'd think this is in this case not a resized version.

Posts with a smaller original_… resolution do download at only 1080p. For example https://www.instagram.com/p/Ci-cLCKMY7w/.

fragrantfungus commented 2 years ago

ok thank you mikf

Muhammadsaupi commented 1 year ago

https://instagram.com/wnndiaa?igshid=YmMyMTA2M2Y=