I just started learning rails. Could you help me understand parsing a single link? Good tutorial will help too...
The question:
When you submit a link in Digg, Facebook etc.. After you say attach link it parses the link to fetch the title, content, images of a particular url. Could you please help me how a similar thing can be implemented in rails?
I have looked at feed parsers like feedzirra etc but they seem to get the complete website feed.. Not just the link we are looking for.. Or is it that I am making a mistake somewhere?
Thanks so much in advance.
ootoovak's answer is correct but I prefer using
mechanize
its an alternative. Using mechanize this would work for you:To install mechanize simply add
gem 'mechanize'
to yourGemfile
and runbundle install
.Looks like you might be looking for something like Pismo: https://github.com/peterc/pismo
An image caveat is:
Make sure you
require 'mechanize'
or addedgem 'mechanize'
to your Gemfile.