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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Max W. (Guest)
on 2007-07-18 15: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

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.