Hacker News new | ask | show | jobs
Saving Instagram images automatically every hour with Node.js or PHP (github.com)
29 points by orsifrancesco 1157 days ago
6 comments

Instagram bot detection works well, too well for tools like these. They'll work for a short while, especially if you only use it yourself, but the API will quickly lie to you ("account does note exist") once they think you're a bot.

Your online demo already shows 404s for accounts I know exist.

I think the only way to get stable access to the API is to take over a device running the official app. I've been considering looking into running Android apps headlessly with Frida hooks for this purpose (should be possible on Linux through Anbox?) exactly because of the annoying not detection frameworks.

All I want is to show the stupid pictures a friend or family member linked me without having to hand over my data to these leeches. I guess that's exactly what their business model is all about, though.

You don't need to use a device. You can use a User-Agent header to make it look like a real device and use a proxy with an IP that a normal user would use
No, that doesn't work for long enough. It appears to work for a while and then it just breaks. Very basic passive fingerprinting is enough to block something as simple as that.

Sending the right user agent (and other headers) will work for most sites, but in my experience it's not enough for Instagram.

correct.. this is what the original repo https://github.com/orsifrancesco/instagram-without-api-node does
correct.. normally the token expires after weeks but.. it expired soon when suddenly thousands of people made requests.. ;) I will fix it
The inability to save images from the mobile app without screenshotting (talk about a perverse incentive) is one of the reasons I hate IG
i wrote a script that rips IG bookmarked images into a Google photo album because IG was the only place to find cool images. last time i checked it was still working. https://github.com/mcpengelly/instagram-saved-to-google-phot...
it is superb!! I love it!!
thanks for the kind words :)
Giphy. It drives me absolutely batshit crazy. I wish image-search sites (looking at you, Google Image Search) wouldn't index images served by sites that make it so very hard to get the actual image. See also: Pinterest.
Half the time with google image search, when you visit the site to view the image it isn't even on the site at all!

I stumbled upon this userscript which adds the view image button back, seems to work so far https://gist.github.com/ner00/ec9ae47e202b8e99f19be44a5af6ba...

Why the hell do these newfang apps not have video controls? Why isn't there a switch to turn off audio by default?

I don't use ig,tiktok, snap but people around me do and its very annoying.

Audio on IG is off by default. it's just that the people around you like hearing the noises.
YouTube shorts has audio on by default.

Instagram has on by default unless you touch to mute it.

Facebook has audio on by default.

Don't know about tiktok. Its banned in India for past 3-4 years

I asked around.

yeah, the lack of video controls seems like an evil, perversely-incentivized design decision
This is why you sideload :)
I would love to have a script that downloads specified friends stories so that I don't have to log into Instagram every 24 hours to avoid missing what my friends are up to.
There are some commercial apps that do (like 4k stogram) that but it's a cat and mouse game with Instagram.
nice one, thank you :)
Thanks, this looks great compared to a lot of the other grabbers/rippers out there. I didn’t find any info this rips the high res image or only lower res web version.
actually the JSON I get from Instagram (by https://github.com/orsifrancesco/instagram-without-api-node) just gives me the images ordered by size.. the first one of the array is always the biggest (but the quality is never amazing)
I believe instagram serves you two different sets of images depending on if you are logged in or not. The “original” resolution can only be seen logged in. I’ll give it a try once a get the time. Thanks
Thanks for this. I'm on mobile but how does it work? I see your service there, do you use proxies or have access to the API?
No API, I'm just using another script I wrote previously

https://github.com/orsifrancesco/instagram-without-api-node

Any luck grabbing stories? their 24h duration sucks.
it could be a nice idea ;)
Sniffagram tells me "Instagram account not found, private account or token expired" on every account I try.
it happens when suddenly thousands of people making a request.. and the token expires ;)