Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Publishing Amazon.com Associates Statistics Help

by gam3 (Curate)
on Apr 18, 2005 at 20:31 UTC ( [id://449016]=note: print w/replies, xml ) Need Help??


in reply to Publishing Amazon.com Associates Statistics Help

The lay out of the page that you are trying to parse has changed, and it would be ver hard to fix that script. I would suggest using WWW::Mechanize to do the parse.

Here is some code to get you started:

#!/usr/bin/perl use Crypt::SSLeay; use WWW::Mechanize; use URI::Escape; our $email = 'insert email address'; our $pass = 'insert password'; our $aftag = 'insert associates tag'; sub main { my $url = q[https://associates.amazon.com/]; my $mech = WWW::Mechanize->new() or die; my $res = $mech->get($url); print "res: ", $res, "\n"; print $mech->status(), "\n"; use Data::Dumper; $res_2 = $mech->submit_form( form_name => 'sign-in', fields => { email => $email, password => $pass, } ); my $orders_report = $mech->follow_link( url_regex => qr/earningsRe +port/i ); print $orders_report; } main();
-- gam3
A picture is worth a thousand words, but takes 200K.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://449016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found