E
endy_tj
Hi,
I am using the Mechanize library to follow a link in a webpage.
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
page = agent.get(ARGV[0])
link1 = page.links.find{|l| l.href.match Regexp.new(ARGV[1])}
link1.click if link1
Now I want to know the current URL of the 'page' variable. Is there a
way to do that? The link's URL cannot be used because it redirects to
another page.
I am using the Mechanize library to follow a link in a webpage.
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
page = agent.get(ARGV[0])
link1 = page.links.find{|l| l.href.match Regexp.new(ARGV[1])}
link1.click if link1
Now I want to know the current URL of the 'page' variable. Is there a
way to do that? The link's URL cannot be used because it redirects to
another page.