Live data from Hacker News

Web Scraping in 2016

franciskim.co

331–340 of 402 posts

Re: Web Scraping in 2016

#331
post #322

Whilst they mean well, I find this a fundamentally deceptive — the arduous parts of "real world" scraping simply aren't in the parsing and extraction of data from the target page, the typical focus of these "scrape the web with X" articles. The difficulties are invariably in "post-processing"; working around incomplete data on the page, handling errors gracefully and retrying in some (but not all) situations, keeping…

> the arduous parts of "real world" scraping simply aren't in the parsing and extraction of data from the target page, the typical focus of these "scrape the web with X" articles.

I can agree with this after having written a scraper as part of core business functionality (we paid a company for access, but access was just to bare HTML blobs and CVS and not an actual API).

However, to what degree you want to do all this is negotiable whereas the 'core' of screen-scraping is not---all scrapers have to first figure out how to get text, parse it, then stick it back in their system.

An example of what I mean when I say 'negotiable' is....

> working around incomplete data on the page

Deciding how to do this depends on your problem domain. Sometimes, we'd get bad computed data from our source but not care because it just meant more work putting more work in calculating it from a more raw source.

> not hitting your target site too often

If they publish how often you are allowed to scrape, this isn't too difficult. If not, then trial and error is the only solution. On occasion, a site simply just doesn't know/care. For example, in my case, the site was static content behind a CDN, so that if we were anywhere under 200 req/second then no flags would ever be raised.

For most smaller sites, that you are unofficially scraping, you may be limited to 1 request every 2 seconds.

Re: Web Scraping in 2016

#332

Earlier quoted context omitted.

The difference is that Google didn't agree to not scrape your data. You, as per their TOS, agreed not to scrape theirs, as part of the condition of using their service.

Which TOS? I might have accepted terms when I created a Google Account but in no way do I agree to a TOS by visiting a URL.

To see the terms that Google thinks you have agreed to, click 'Terms' at the bottom of www.google.com

If that doesn't hold up in court, in future on your first visit to Google it will simply display some text and require that you click 'I agree' to continue.

Either way, it seems reasonable to me that you should agree to their terms in order to use their service.

Re: Web Scraping in 2016

#333

Earlier quoted context omitted.

The difference is that Google didn't agree to not scrape your data. You, as per their TOS, agreed not to scrape theirs, as part of the condition of using their service.

Which TOS? I might have accepted terms when I created a Google Account but in no way do I agree to a TOS by visiting a URL.

I'm under the impression that simply having a visible legal notice like "By visiting this page you agree to our ToS" is enough to bypass that.

Re: Web Scraping in 2016

#335

Earlier quoted context omitted.

Under the CFAA, they do have the right to determine what constitutes authorized access. If they say you're unauthorized for using the wrong buttons on your mouse, then you're unauthorized. It's treated very similarly to trespass on private land. You can try telling the judge it's baloney, but if he's going by current precedent, he probably won't agree with you.

It is not the same flavor of violation as trespassing on land, more like riding a bicycle on a sidewalk. Fortunately, I'm not in the business of scraping sites, but I still find this legal precedent abhorable, and I hope it gets struck down in court when push comes to shove. I would certainly vote that way if given the chance.

It's like riding a bike in a skate-park with a small sign saying "No bikes".

Re: Web Scraping in 2016

#336
post #288

> But if you are automating your exact actions that happen via a browser, can this be blocked? Yes, by checking times between actions and number of actions in a time period, and blocking atypical activity. I was IP banned from a site once for a few months, after trying to scrape it too much and hitting links on the site that were hidden from humans. The random wait settings specified in the post are better than nothi…

Not scraping but banks don't even do this for their security which I found surprising. I just finished building a chrome extension (https://chrome.google.com/webstore/detail/uyp-free-blasts-th...) that auto-logins into pretty much any bank or financial web site without having to type anything. The key difference to other password managers is it can auto-fill pretty much anything.

I guess it's part password manager (it stores passwords encrypted in browser storage, not remotely) and part automation wizard :)

Re: Web Scraping in 2016

#337
post #302

Corporations will abuse your personal integrity whenever they get a chance, while abiding the law. Corporations will cry like babies when their publicly available data (their livelyhood) gets scraped. They will take you to court. They consider their data to be theirs, even though they published it on the internet. They consider your data (your personal integrity) to be theirs as well, because how can you assume perso…

Regarding the scraping and the legality of it all. I wonder if it's still illegal if you respect the robots.txt and other meta elements in html standards.

If Google's actions were illegal, I'm sure that they would have been sued even if their scraping and indexing usually is helpful for the website owner

Re: Web Scraping in 2016

#339

Earlier quoted context omitted.

Which TOS? I might have accepted terms when I created a Google Account but in no way do I agree to a TOS by visiting a URL.

I'm under the impression that simply having a visible legal notice like "By visiting this page you agree to our ToS" is enough to bypass that.

Not in the EU, you have to explicitly and manually agree to them.

Re: Web Scraping in 2016

#340
post #329
post #311

Earlier quoted context omitted.

If you don't want your data public, then don't make it public in the first place. That's a good rule of thumb.

Putting it behind a signup page with terms that don't allow sharing is not "making it public". And while in the US that may "just" be treated as unauthorized access, in the EU, if you make the data public it's also a violation of the Data Protection Directive, putting you at risk of prosecution in every EU country from which you have included data. You may be right from a risk minimisation perspective. But for a lot…

Eh, not really. The Data Protection Directive doesn’t even apply here – if the first party (OKCupid) made it available to a third party (the scraper), then the first party can be held in violation, but not the third party.
Post reply on HN