News for hackers. Stuff that matters.
Re:Notes on Writing Web Scrapers by marginalia_nu on Thursday December 02, 2021 @02:09PM (#29420940)
> Be nice to your data sources.

Very much this. If I know I'm about to possibly consume a non-negligible amount of resources from a server by indexing a website with lots of subdomains, I typically send the webmaster an email asking them if this is fine, telling them what I use the data for and how often my crawler re-visits a site, asking if I should set any specific crawl delays or do it in particular times of day.

In every case I've done this, they have been fine with it. It goes down a lot better than just barging in and grabbing data. This also gives them a way of reaching me if something should go wrong. I'm not just some IP address grabbing thousands of documents, I'm a human person they can talk to.

If I'd get a no, then I would respect that too, not try to circumvent it like some entitled asshole. No means no.

Re:Notes on Writing Web Scrapers by GekkePrutser on Thursday December 02, 2021 @11:34PM (#29426647)
I wouldn't do that. It's better to stay under the radar IMO. They usually won't notice the traffic if it's just for personal reasons. And who says the internet can't be used for automatic retrieval?

I'm not going to pound websites with requests every minute of course but I think this falls under legitimate use. Whether I click the button myself or just schedule a script to do it shouldn't matter so much.

But if you ask you draw attention to it and get their legal dept involved (after all most websites are not run by a single webmaster in their bedroom) who will most likely say no because legal people are hesitant to commit to anything.

But maybe my usecase is different. I just scrape stuff to check if something I want is back in stock, to download my daily pdf newspaper I pay for, archive forum posts I've written, stuff like that. I don't index whole sites.

But yeah I do make sure I don't bombard them with requests, though this is more from a "staying under the radar" point of view. And indeed to avoid triggering stuff like cloudflare.

But if you're scraping to run your own search engine and offer the results to the public the situation is much more complex of course, both technically and legally.

Re:Notes on Writing Web Scrapers by cushychicken on Thursday December 02, 2021 @02:36PM (#29421315)
I've never actually reached out to a webmaster to ask permission, but I think that's a great idea. (They may even have some suggestions for a better way to achieve what I'm doing.)

How do you typically find contact info for someone like that?

I'm running very generous politeness intervals at the moment to try and ensure I'm not a nuisance - one query every two seconds.

Re:Notes on Writing Web Scrapers by marginalia_nu on Thursday December 02, 2021 @02:42PM (#29421391)
If you can't find the address on the website, sometimes it's in robots.txt, you could also try support@domain, admin@domain or webmaster@domain.

Contact forms can as well, usually they seem to get forwarded to the IT department if they look like they have IT stuff in them, and I've had reasonable success getting hold of the right people that way.

Re:Notes on Writing Web Scrapers by cushychicken on Thursday December 02, 2021 @02:48PM (#29421472)
I'll give that a shot!

Do you know if this is generally an in-house position for companies that use third party platforms?

I ask because Workday has been the absolute bane of my indexing existence, and I suspect they make it hard so they can own distribution of jobs to approved search engines. (Makes it easier to upcharge that way, I suppose.)

If the administrator for the job site is the Workday customer (i.e. Qualcomm or NXP or whoever is using Workday to host their job ads), I'd suspect I'd have a chance at getting a better way to index their jobs. (My god, I'd love API access if that's a thing I can get. I'd be a fly on the wall in most cases - one index a day is plenty for my purposes!)

Re:Notes on Writing Web Scrapers by Terry_Roll on Thursday December 02, 2021 @06:06PM (#29424161)
If their security is any good, their firewall may tarpit you anyway if they can see you are spidering links quicker than a human can read, your browser agent offers no clues and/or your ip address (range) offers no clues.
Re:Notes on Writing Web Scrapers by buffet_overflow on Thursday December 02, 2021 @04:24PM (#29422831)
This is a nice approach. I generally leave a project specific email in the request headers with a similar short summary of my goals.
Re:Notes on Writing Web Scrapers by marginalia_nu on Thursday December 02, 2021 @05:11PM (#29423476)
Yeah, my User-Agent is "search.marginalia.nu", and my contact information is not hard to find on that site. Misbehaving bots are very annoying and it's incredibly frustrating when you can't get hold of the owner to tell them about it.