Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Publishing Amazon.com Associates Statistics Help

by gam3 (Curate)
on Apr 18, 2005 at 20:31 UTC ( #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
Node Status?
node history
Node Type: note [id://449016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2021-05-06 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (75 votes). Check out past polls.

    Notices?