14 ms·
Ask HN: How to deal with GDPR / cookie notices in the context of a crawler?
To comply with the new European legislation many websites put a GDPR / cookie consent notice in front of their websites. There are different implementations of this. While some are only implemented as modal covering the website or bar on the bottom of the screens (in both cases right next to the original content), other implementations redirect the user to a totally different (sub-)domain or even hijack the request and show the consent form instead of the requested content (on the same URL with a 200 status code).
The latter ones present a issue to my crawler. I cannot access the content of the page without accepting those notices.
Things I'm considering to bypass those notices:
* US IP address (easy to implement, but some websites also display those notices to US IP's)
* Heuristics to detect those notices and accept them programatically (takes some time to implement - while a couple of vendors (i.e. OneTrust) offer off-the-shelf solutions which are easy to identify and automate, there are also many custom made solutions, so the system would need understand the concept of a consent form and how to bypass it - some forms only require the press of the right button, others involve checkboxes/radio buttons). To collect test data one solution might be to visit a set of websites once with an US IP, once with an EU IP and/or with different user agents (browser or googlebot).
Do you have any ideas how to approach this problem? Or are you even utilizing some techniques already and are willing to share them?
- Scaur 8y agoThanks for asking this question, I'd like to learn about this too.
- jjcm 8y agoSide question - how does HN feel about the cookie/gdpr notices in general? I personally feel that while I like the purpose they have, they just feel like spam at this point. I kind of expect most websites to use cookies, and if I didn't want them to I'd probably block them with an extension. As for the GDPR notices, are these going to be persistent forever? It feels like the web did 5 years ago, except instead of viagra ads I'm getting GDPR and cookie popups on every site now. Overall I feel like the intent of these is correct, but the execution is terrible. I'd much rather have say a badge in the address bar of the browser (similar to the https badge) saying a site was gdpr compliant and used cookies then a popup everywhere.
- ReverseCold 8y ago> I'd much rather have say a badge in the address bar of the browser (similar to the https badge) saying a site was gdpr compliant and used cookies This would also be much easier to implement. Just add a GDPR-Compliant header (or similar), and the browser already knows if there are cookies. I think the actual issue is that browsers are open source/non-commercial things that are usually owned by companies in the US (a place where EU laws do not directly apply). They would have to ask nicely instead of making it a law.
- flingo 8y agoI look forward to a future where the web has separate <ad> <tracker>, and <drm> tags. Would standardize all this garbo and make blocking components much easier. Can anyone just write an RFC?
- newsbinator 8y agoI love this. And Europe can make these tags mandatory for all ads and trackers.
- flingo 8y agoI wouldn't like to see that. What's an ad, what's a tracking script? Regulation like this usually has unintended consequences. I'd expect the push to come from browser vendors. Either by blocking ads that aren't in those elements by default, or feeding them garbage data.
- newsbinator 8y agoThere could be a technical definition of an ad: "user-visible text or image(s) meant to advertise a product or service, separate from the primary purpose or offer of the page in which it is embedded" ... or something. IANAL.
- 8y ago
- muhammasaleem 8y agoThats great yr
- muhammasaleem 8y agoGood work
- highace 8y agoDon't use a server or IP based in Europe. Problem solved.
- yardstick 8y agoMany sites don’t distinguish between EU and non-EU IPs.
- watwut 8y agoIf you have customers in EU or any business with EU, you did not solved the problem. The law applies to users regardless of where the server those users connect to is located.
- ddebernardy 8y agoI believe he meant to not crawl using an EU-based IP address. Which would make sense if not for the fact that many sites are serving the GDPR notice to all users - EU or not.
- ndarilek 8y agoI have a related question. How do you bypass them in the context of an RSS reader/podcatcher? I was building a service to parse some podcast feeds into JSON, and noticed they were failing on NPR podcasts. Pulled up the URL fine on my laptop, but it failed in Hetzner. Of course, it failed because it was getting some sort of GDPR page at the podcast feed URL. I'm wondering if there was some way around this, because it's not like podcatchers can opt into something via an RSS feed...can they? I'm pretty sure I passed headers only accepting feed content-types, but even that wasn't enough. Sure I can host elsewhere, but I just didn't care enough about the project to do that. But if there's a way around this, then I might pick it up again.
- josh64 8y agoWe're getting the same issue in our RSS reader (Vienna RSS). Not sure how to deal with it currently.
- raverbashing 8y agoYeah, rss should be machine readable, that seems like a bug on their end
- zaarn 8y agoI ran into this issue with a few tumblr blogs I follow via RSS. The RSS reader (TTRSS) gained a sorta-unofficial plugin that would fake the GDPR consent cookie. I did contact support and they promised to fix this bug. Though overall, for your podcast it's a bug too. You don't need GDPR consent to display a RSS feed document at all unless you sell IP addresses to third parties.
- Rjevski 8y agoThat's a bug on their side. The RSS feed should not require any consent since it doesn't have tracking (I don't think you can even embed trackers in an RSS feed). If they want tracking they can link to outside pages in the RSS feed and put the consent notice on those before displaying the content that requires tracking.
- ddebernardy 8y agoManually accept (or reject) the tracking once, and then pass the relevant cookie as part of your crawler's request.
- eberkund 8y agoWhy does every website need to create its own UI for this? Whatever happened to that "Do not track" browser setting? This should be equivalent to rejecting all of these notices automatically.
- dogma1138 8y agoSounds like a possible use case for a mechanical Turk for those that do a redirect popup and not just a forefront dom object while loading the actual content behind it.