Web scraping with Ruby
chrismytton.uk
Web scraping with Ruby
1–10 of 32 posts
Re: Web scraping with Ruby
#2Mechanize allows you to write clean, efficient scraper code without all the boilerplate. It's the nicest scraping solution I've yet encountered.
Re: Web scraping with Ruby
#3Re: Web scraping with Ruby
#4Re: Web scraping with Ruby
#5How do you get the script to save the json file?
$ ruby scraper.rb > showings.json
Re: Web scraping with Ruby
#6I'd suggest going with mechanize from the off - not just, as the article says, "[when] the site you’re scraping requires you to login first, for those instances I recommend looking into mechanize". Mechanize allows you to write clean, efficient scraper code without all the boilerplate. It's the nicest scraping solution I've yet encountered.
Re: Web scraping with Ruby
#7Re: Web scraping with Ruby
#8Re: Web scraping with Ruby
#9Can anyone list some good resources about scraping, with gotchas etc.?
Typhoeus has a built-in concurrency mechanism with callbacks with specified number of concurrent http requests. You just create a hydra object, create the first request object with URL and a callback (you have to check errors like 404 yourself) where you extract another URLs from the page and push them to hydra again with the same on another callback.
Re: Web scraping with Ruby
#10Can anyone list some good resources about scraping, with gotchas etc.?