From: Arun Kumar Date: 2009-03-17T14:58:01+09:00 Subject: Re: Youtube...urgent, please help David Masover wrote: > Arun Kumar wrote: >> Hi, >> >> I'm new to ruby and my co. has given me an assignment in ruby. It is >> regarding html extraction. > > You probably want Mechanize. > >> domain = gets >> #concatinating 'http://www.' with the url to open the page >> url = "http://www."+domain >> > > Take a look at that URL -- I'd say you don't need 'www' in that. > > But I'm guessing what's hurting is the newline at the end of it. > > Quick fix: > > domain = gets.chomp > url = "http://#{domain}" Sorry to say David, I tried that but the same error is producing. Is it because i've not set the user agent. Can u please tell me how to set the user_agent for mozilla. Thanks for ur immediate reply -- Posted via http://www.ruby-forum.com/.