SN-Koarashi / ig-helper

In Instagram, downloading is possible for both photos and videos from posts, as well as for stories, reels or profile picture.
GNU General Public License v3.0
41 stars 3 forks source link

Stop relying on Forced Fetch API?! #10

Open gabianastasie opened 6 months ago

gabianastasie commented 6 months ago

Hi there,

I just wanted to let you know that "Forced Fetch API" seems to offer lower-quality pictures.

Ironically, the img[src] of the photos you can see inside the DOM tree offer much higher-quality.

Media API seems great, but it's pretty rate-limited. Not sure, but many times I saw the same resolution for the resource downloaded via Media API and the resource manually downloaded via the URL I found within the DOM tree. So relying on the URLs found within DOM tree would drastically reduce the calls to Instagram APIs?!

And maybe just try to heavily rely on the information in the DOM tree and/or Media API and stop relying on Forced Fetch API since the quality is not that great?! 🤔

SN-Koarashi commented 6 months ago

This issue has been mentioned previously by other users and I'm still looking for a solution to this issue.

As mentioned in the description, the Force Fetch API provides a one-time capture of all resources in the post. Although the img[src] element in the post has better photo quality, the number of each capture is limited (only 1~4 resources), so how to strike a balance between the two is a question I'm thinking about.

Regarding the problem of not turning on the Force Fetch API, but sometimes still using it, it is because when the fetched resource contains a blob video, there is usually no video URL in the DOM tree for retrieval, and the Force Fetch API will be called to obtain resource URL.