Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Mechanize gem -- help
Raveendran Jazzez
4/4/2009 11:29:00 AM
Hi All,
Code:
require 'mechanize'
@agent = WWW::Mechanize.new
source=@agent.get("
http://yahoo....
)
puts source # => It gives Source code.
NEED:
I entered "
http://yahoo....
this url in browser , but its goes to
"
http://in.yahoo.com/?...
.
I want to get the redirected url. Is there any possibility to get that
redirected link ?
Expected Example:
require 'mechanize'
@agent = WWW::Mechanize.new
source=@agent.get("
http://yahoo....
)
puts X=source.GET_REDIRECTED_URL #=>
http://in.yahoo...
Thanks in Advance,
P.Raveendran
http://raveendran.wor...
--
Posted via
http://www.ruby-...
.
1 Answer
Raveendran Jazzez
4/6/2009 4:05:00 AM
0
Hi All,
I tried
require 'mechanize'
@agent = WWW::Mechanize.new
source=@agent.get("
http://yahoo....
)
puts source.uri #=>
http://...
BUT I Expect like
puts X=source.GET_REDIRECTED_URL #=>
http://in.yahoo...
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Mechanize gem -- help
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password