I have a Perl script that uses LWP::UserAgent to download a webpage which it then processes using regular expressions. The problem is that portions of the webpage which are regular HTML aren't being returned to LWP::UserAgent since the site recognizes that the browser doesn't have Flash installed and instead returns HTML prompting us to download Flash instead of the appropriate HTML that we need to parse.
How can I make LWP::UserAgent appear to have flash installed to the web server we're requesting the page from? I'm using the following code to initialize LWP::UserAgent:
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(cookie_jar => { },requests_redirectable => [ ]);
$ua->agent('Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:9.9.9.9) Gecko/20079999 Firefox/2.0.0.1');
$ua->timeout(10);
Thanks in advance for your help!
I would recommend you to use Firebug for that - very nice and powerful addon for FF. I agree with Michael, that the server can learn such info about the client only from headers send to him, or from script, that runs on the client and can talk to server (JavaScript, Flex, ...). For JavaScript case you can try to disable it in FF temporary and try to reload the page: if server answers you the same as for LWP, then you know the answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With