[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Get title from URL?

Dan Diebolt

4/24/2009 8:14:00 AM

[Note: parts of this message were removed to make it a legal post.]

require 'Hpricot'
require 'open-uri'

url="http://www.ruby-lang....
doc=Hpricot(open(url))
title=(doc/"title").inner_text

=> "Ruby Programming Language"