A good host xD Preferably one that doesn't mind giving you a bunch of IPs, and if they do, don't charge a fortune for them. Then you can worry about what software you're gonna use.
Ask HN: What are best tools for web scraping?
61–70 of 243 posts
Re: Ask HN: What are best tools for web scraping?
#621. First go get and run this code, which allows immediate gathering of all text nodes from the DOM: https://github.com/prettydiff/getNodesByType/blob/master/get...
2. Extract the text content from the text nodes and ignore nodes that contain only white space:
let text = document.getNodesByType(3), a = 0, b = text.length, output = []; do { if ((/^(\s+)$/).test(text[a].textContent) === false) { output.push(text[a].textContent); } a = a + 1; } while (a That will gather ALL text from the page. Since you are working from the DOM directly you can filter your results by various contextual and stylistic factors. Since this code is small and executes stupid fast it can be executed by bots easily.
Test this out in your browser console.
Re: Ask HN: What are best tools for web scraping?
#63If you are a programmer, scrapy[0] will be a good bet. It can handle robots.txt, request throttling by ip, request throttling by domain, proxies and all other common nitty-gritties of crawling. The only drawback is handling pure javascript sites. We have to manually dig into the api or add a headless browser invocation within the scrapy handler. Scrapy also has the ability to pause and restart crawls [1], run the cra…
Would you recommend it for scalable projects ? Like, crawl twitter or tumblr ?
Re: Ask HN: What are best tools for web scraping?
#64Re: Ask HN: What are best tools for web scraping?
#65If you speak Ruby, mechanize is good: https://github.com/sparklemotion/mechanize
Re: Ask HN: What are best tools for web scraping?
#66Earlier quoted context omitted.
Would you recommend it for scalable projects ? Like, crawl twitter or tumblr ?
Yes. It beats building up your own crawler that handles all the edge cases. That said, before you reach the limits of scrapy, you will more likely be restricted by preventive measures put in place by twitter(or any other large website) to limit any one user hogging too much resources. Services like cloudflare or similar are aware of all the usual proxy servers and such and will immediately block such requests.
Re: Ask HN: What are best tools for web scraping?
#67All data (zip files, pdf, html, xml, json) we collect are stored as-is (/path/to///) and processed later using a Spark pipeline. lxml.html is WAY faster than beautifulsoup and less prone to exception.
We have cronjob (cron + jenkins) that trigger dataset update and discovery. For example, we scrape corporate registry, so everyday we update the 20k oldest companies version. We also implement "discovery" logic in all of our crawlers so they can find new data (ex.: newly registered company). We use Redis to send task (update / discovery) to our crawlers.
Re: Ask HN: What are best tools for web scraping?
#68I use nightmarejs https://github.com/segmentio/nightmare which is based on electron; I recommend it if you're on js
Re: Ask HN: What are best tools for web scraping?
#69Re: Ask HN: What are best tools for web scraping?
#70If you’re looking to run it on a Linux machine also take a look at https://browserless.io (full disclosure I’m the creator of that site).