in reply to HTTP::Request -Variable values not translating in URL

A while back, I had to write a script that crawled a site which distributed a file through a flash application. I noticed that the cookie was always contained in the url and followed a specific pattern. Thanks to PerlMonks, I was able to figure that out. Firstly, I used WWW::Mechanize::Firefox.. you may need to in this case, too- I'm not sure. Anyways I start with something like:
use strict; use warnings; use WWW::Mechanize::Firefox; use Data::Dumper; use DateTime; ## you can set the date to nearly anything with this module, refer to +its documentation my $mech = WWW::Mechanize::Firefox->new(launch => 'C:\path\to\your\firefox.exe', autoclose => 1, autodie => 1 ); my $jar = $mech->cookies(); print Dumper($jar); # for debugging, you need to understand the data s +tructure of this cookie to properly use it
Alternatively, you may not need to use the cookies at all. But since it is not completely clear to me what your goal is with this script, I can't say for certain. Briefly looking at your url, you may be able to use just plain old WWW::Mechanize and then $mech->dump_text;

Replies are listed 'Best First'.
Re^2: HTTP::Request -Variable values not translating in URL
by Tonyd5915 (Initiate) on Dec 12, 2013 at 22:28 UTC

    I am an idiot. I had another variable named "$year" a couple hundred lines up the script... It was from a routine that captured the date.

    Thank goodness I only wasted six hours on this...