aahouzi / Instagram-Scraper-2021

Scrape Instagram content and stories, using a new technique based on the har file (No Token + No public API).
MIT License
111 stars 12 forks source link

Saving cached images #6

Closed yunhwankim2 closed 3 years ago

yunhwankim2 commented 3 years ago

I manually inspected the network tab of Chrome in the Instagram page and saw there are cached images. Can you add a function to save these cached images with Instagram data instead of sending additional request to Content URL to get images? The filenames of the images can be parsed from Content URL, so an image file and the data of the image file can be easily matched, it the images can be saved. Thank you for your work!

ghost commented 3 years ago

I see which images u r talking about, but u should know that I'm scrapping also insta videos in the feed, and the images u mentioned are screenshots of some videos present in the feed, along the other images. Plus, the links u saw in these images are not the ones I'm scraping since it doesn't correspond to the original data as I mentioned earlier. What I can possibly do is maybe a function to download images+videos starting from the links I got?

yunhwankim2 commented 3 years ago

Okay. I worry that our IP would be blocked if we retrieve images (and videos) using the links in Content URL from Instagram website (when done too much). So I'm thinking of using the images which is already in our local machine, so that we don't need to be worried about being blocked. Now I know what you mean. Thank you for the response.