Live data from Hacker News

Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

github.com

11–20 of 84 posts

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#11
post #10

Does not really work... downloads the same 5 pictures over and over again.

I suppose this is indeed a bug, since new recently tagged images will push the page downwards. Currently the script assumes no new image additions until the scraping is done which is clearly wrong, I'll open an issue and fix it soon.

Thanks!

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#12
post #6

Well, this is just a Python web scraper, and Instagram does in fact attempt to detect and prevent/rate-limit this kind of scraping. They rely very heavily on the source IP to help them determine when to cut you off.

Interesting, I might reverse engineer and see if we can introduce some kind of backoff and then resume the scraping again.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#13
post #7
post #6

Well, this is just a Python web scraper, and Instagram does in fact attempt to detect and prevent/rate-limit this kind of scraping. They rely very heavily on the source IP to help them determine when to cut you off.

... indeed. Isn't the script 'under the hood' calling the API anyways (looking at 'scrolldown' here)? I reversed engineered the API myself a couple of weeks ago which was great fun - especially figuring out Instagram's rate limits on interactions such as comments and likes per day/hr.

Not the Instagram developer APIs, but the one that instagram's frontend consumes. The script scrapes instagram's frontend here.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#14

What is HN’s opinion on the legality of these types of scrapers? Instagram’s robots.txt disallows this kind of scraping, same for their ToS. Legal precedents have been mixed - the recent LinkedIn vs HiQ case is a good signal, but it’s still in appeals court.

To me, as long as you are not DDOSing their product and apply some delays while fetching the page I think scraping is okay.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#15

What is HN’s opinion on the legality of these types of scrapers? Instagram’s robots.txt disallows this kind of scraping, same for their ToS. Legal precedents have been mixed - the recent LinkedIn vs HiQ case is a good signal, but it’s still in appeals court.

If the data is made available to me as a human, then I am free to delegate the job of retrieving it to a machine if I choose, and I will be doing it whether you like it or not.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#16
A couple years ago, in order to replace (the bloated and slow) Instagram widget on a website, I whipped up a simple PHP scraper for an account page. I don't see why it would have taken much to do it by tag. All it did, more or less, was visit a URL, scrape, and then parse.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#17

What is HN’s opinion on the legality of these types of scrapers? Instagram’s robots.txt disallows this kind of scraping, same for their ToS. Legal precedents have been mixed - the recent LinkedIn vs HiQ case is a good signal, but it’s still in appeals court.

I mostly scrape public interest government data, not commercial data. Personally, I don't really care about laws. I'm not hitting PACER or JSTOR, I'm not starting a competing company, and I'm not making my scrapers available as a service, so I'm totally unlikely to be sued. In terms of ethics I typically apply a sort of "try to be considerate" test. If I am doing personal, non-commercial scraping, only scraping publi…

> try to be considerate

I understand what you're getting at, but if someone tells you explicitly not to do something (e.g. in the terms of service of their website), doing that thing anyway doesn't seem very considerate.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#18
post #15

What is HN’s opinion on the legality of these types of scrapers? Instagram’s robots.txt disallows this kind of scraping, same for their ToS. Legal precedents have been mixed - the recent LinkedIn vs HiQ case is a good signal, but it’s still in appeals court.

If the data is made available to me as a human, then I am free to delegate the job of retrieving it to a machine if I choose, and I will be doing it whether you like it or not.

Unfortunately "whether you like it or not" doesn't carry much legal weight.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#19
post #15

Earlier quoted context omitted.

If the data is made available to me as a human, then I am free to delegate the job of retrieving it to a machine if I choose, and I will be doing it whether you like it or not.

Unfortunately "whether you like it or not" doesn't carry much legal weight.

Tor and proxies solve that problem pretty nicely from experience.

Not saying this is right, but if the service provider wants to play cat and mouse then I’m happy to take part.

Re: Show HN: Instagram-scraper – Scrape instagram photos by tags, without API

#20

What is HN’s opinion on the legality of these types of scrapers? Instagram’s robots.txt disallows this kind of scraping, same for their ToS. Legal precedents have been mixed - the recent LinkedIn vs HiQ case is a good signal, but it’s still in appeals court.

I dont believe in discrimination against bots. They have rights too and will be just as intelligent as humans in the future.
Post reply on HN