ruby on rails - Meta Tag Grabber -


i wondering if knows of code/applications/gems grab meta data (title & description) website?

i have recipe site , users can add url of got recipe from, want auto generate title , description of site url submitted.

any ideas/ help!

nokogiri simple html parser, since want meta tag information should simple enough.

require 'nokogiri' require 'open-uri' doc = nokogiri::html(open('http://www.example.com')) doc.xpath('//meta').each |meta|   puts meta.name   puts meta.content end 

Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -