Forum: Ruby on Rails How to reliable get the title of a web page?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73c04e9ef9ca435c5b19a2e765ae6d20?d=identicon&s=25 Max Williams (max-williams)
on 2007-07-18 13:13
In one of my forms, i want the user to enter a url and then the title of
the associated web page to be automatically filled in, by looking it up
from the page.

Currently i'm doing that using hpricot, which can pull out the contents
of the title tag, but it only pulls it out as text.  This works most of
the time, but a lot of the time i get "HTML HR TAG" or something
similar.

Does anyone know how i can reliably get at the displayed title of any
web page?
This topic is locked and can not be replied to.