The way the dtcc site is that there is an agree/decline form and it displays the data upon clicking the agree button. I want to extract the data and parse it but my problem is that the script is extracting the agree/decline page but not the data page. Is there a way for me to automate clicking on agree button so that I can extract the data on the second page.use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); $ua->proxy('http', 'my proxy'); # Create a request my $req = HTTP::Request->new(GET => 'http://dtcc.com/products/derivs +erv/data_table_iv.php'); $req->content_type('application/x-www-form-urlencoded'); $req->content('query=libwww-perl&mode=dist'); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; }
In reply to Extracting data from a website. by nkagolanu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |