subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.38k stars 686 forks source link

[BUG] - Unable to get HD Profile Picture via user_info_by_username #1081

Closed ashirali44 closed 1 year ago

ashirali44 commented 1 year ago

I am trying to fetch the HD profile picture of the user by using the following function:

user = cl.user_info_by_username(username).dict()

and I am getting this link: https://shorturl.at/ikosG But here is the problem this is not the real HD Version here I am trying some other API which is giving me the HD Version here is the URL from that API: https://shorturl.at/vyKMN

Can we get HD profile picture through instagrapi as well? @adw0rd please let me know if we are fetching the best hd version thanks in advance 👍

adw0rd commented 1 year ago

Debug the call to get the profile and find the HD photo there. For example like this:

user = cl.user_info_by_username(username).dict()
print(cl.last_json)

You can send me your improvements in the form of a PR, thanks!

ashirali44 commented 1 year ago

It still gives the url which is not full HD I am using the above method and have fetched the json. image Using this one, as its giving 320x320 which is not HD.

adw0rd commented 1 year ago

@ashirali4 I'm waiting for your decision and PR

Try using a device with a higher screen resolution, this will most likely help

ashirali44 commented 1 year ago

image I have tried this @adw0rd It seems the device changes reflect in the dump.json file and in the Login notification as well, But I am getting the same 320x320 still with the upper device I have tried two or more devices as well MI 9S and Samsung one.

ashirali44 commented 1 year ago

Hi @adw0rd do I need to add this in improvements form if the changing device not working?

adw0rd commented 1 year ago

@ashirali4 yes, fix it and send your PR. Thanks!

ashirali44 commented 1 year ago

@adw0rd sent, please review and lemme know.

adw0rd commented 1 year ago

@ashirali4 https://github.com/adw0rd/instagrapi/pull/1083#pullrequestreview-1271195724