Hi All,
I am trying to write a simple script to get webpage using LWP::simple. the contents received show that
<noscript>
<div class="ae_error_area">ArrayExpress uses JavaScript fo
+r better data handling and enhanced representation. Please enable Jav
+aScript if you want to continue browsing ArrayExpress.</div>
</noscript>
my script is
use LWP::Simple;
use HTTP::Cookies;
use LWP::UserAgent;
use HTTP::Request::Common qw(GET);
my $ua = LWP::UserAgent->new;
my $url= 'http://www.ebi.ac.uk/arrayexpress/q-aer/leukemia%20Homo%2
+0sapiens';
# Define user agent type
$ua->agent('Mozilla/8.0');
# Cookies
$ua->cookie_jar(
HTTP::Cookies->new(
file => 'mycookies.txt',
autosave => 1
)
);
my $content = get $url;
die "Couldn't get $url" unless defined $content;
print $content
Can you please suggest how can I over come this problem
Thank you
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.