Are there known user agents that you can identify as coming from the scrapers? If so, you either block that way and not worry about IP addresses or choose to disable Google Analytics on those requests so it doesn't skew GA data.
Ask HN: How are you dealing with scraping hits from EC2 machines?
21–30 of 42 posts
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#22Earlier quoted context omitted.
Mostly duplicate content & messing up my analytics (increased bounce rate, decreased time spend on page etc.)
What analytics are you using? I thought most would use javascript to avoid problems like this, and I would wager that the vast majority of bots don't bother executing javascript. You will always have legit bots hitting your site as well.
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#23Are there known user agents that you can identify as coming from the scrapers? If so, you either block that way and not worry about IP addresses or choose to disable Google Analytics on those requests so it doesn't skew GA data.
As was identified, most of the scraping occurs via Selenium. Selenium just automates a real browser, so it'd look like 100% legit traffic with a legit user agent (it defaults to using Firefox)
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#24Earlier quoted context omitted.
As was identified, most of the scraping occurs via Selenium. Selenium just automates a real browser, so it'd look like 100% legit traffic with a legit user agent (it defaults to using Firefox)
So the solution is simple isn't it? Google Analytics filter > filter referers like Selenium (or the entire EC2 block).
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#251) You can block EC2 wholesale. You've mentioned issues with this, and can be bypassed via VPN or using another network. EC2 is attractive because it's so cheap (with spot instances, starts at 0.3 cents per hour), but it's not the only option.
2) Timing. Normal traffic isn't rapid fire. Many scrapers, however, fire off their scripts as quickly as possible. Block traffic that doesn't have enough meaningful pauses.
3) Report addresses to Amazon. I really don't know if they'd take action.
4) Reverse lookup, or whitelist addresses. I know if it's a legitimate source (like Flipboard) they'd probably work with you at least a little bit. Reverse lookup might not be successful, but maybe that can help you whitelist any legit sources that map their AWS IP to a legit DNS name. Most scrapers use the AWS external domain name. Also, I imagine legit sources give you a distinctive user agent, so that can help you let traffic through.
However, if you have a public resource, this is simply an issue you have to deal with. Anayltics: I'd just filter out traffic scraped traffic from your analytics. Content duping: blocking scrapers won't stop this. If someone stealing your content can't scrape at 0.5 cents per hour, they'll pay someone 5 cents an hour to copy/paste. You just have to use the same diligence others use, in terms of reporting to Google, etc. Perfomance: use Varnish/nginx/etc to combat performance hit from scrapers.
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#26Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#27Hunting down bots is a waste of time and effort better spent elsewhere.
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#28behavioral modeling - rate limiting, bandwidth restrictions, etc
identity verifications - make sure they are running the browser they say they are, allow google and other search engins by whitelisting their IPs, block others that are pretending to be google, etc
code obfuscation - make it hard for them to scrape your code. Change up the CSS, etc.
OR you can use an automated service to do all this for you. Check out www.distil.it. Full disclosure, I'm the CEO of Distil.
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#29I've done a lot of automation with Selenium, on EC2. (For the curious, it was on behalf of clients with legit access, not wholesale pillaging of a public resource) 1) You can block EC2 wholesale. You've mentioned issues with this, and can be bypassed via VPN or using another network. EC2 is attractive because it's so cheap (with spot instances, starts at 0.3 cents per hour), but it's not the only option. 2) Timing. N…
They take action. I've seen it done.
Re: Ask HN: How are you dealing with scraping hits from EC2 machines?
#30Earlier quoted context omitted.
So the solution is simple isn't it? Google Analytics filter > filter referers like Selenium (or the entire EC2 block).
Not sure how you could filter Selenium. A well written script looks like normal traffic.
Think about the goal of a scraper, it needs to actually walk through all the content. That doesn't look like a normal user at all. An individual request might look ok, but in aggregate the pattern of a robot pops out.
https://www.usenix.org/conference/usenixsecurity12/pubcrawl-...