What is your recommendation of writing a web crawler in Ruby? Any lib better than mechanize?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want just to get pages’ content, the simpliest way is to use
open-urifunctions. They don’t require additional gems. You just have torequire 'open-uri'and… http://ruby-doc.org/stdlib-2.2.2/libdoc/open-uri/rdoc/OpenURI.htmlTo parse content you can use Nokogiri or other gems, which also can have, for example, useful XPATH-technology. You can find other parsing libraries just here on SO.