in reply to mp3.com stats

Here's some code to get you connected and snag the first song page jeffa is going to go back and pretty this up to display all songs and their stats this will just get you connected up :) You have to have Crypt::SSLeay, OpenSSL and libwww installed for this to work.
#!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Cookies; # info to pick which page my $email = ''; # SET THIS TO YOUR EMAIL my $password = ''; # SET THIS TO YOUR PASSWORD my $band_id = ''; # SET THIS TO YOUR BAND ID (it's in the url after +you login in after 'band_id' # make a new agent my $agent = new LWP::UserAgent; # make a new cookie jar my $cookie_jar = HTTP::Cookies->new; # build the request for the login web page (so we get the set of cooki +es my $req = POST ('https://login.mp3.com/login', [ cmd => 'login', dest => 'http://studio.mp3.com/cgi-bin/artist-admin/login. +cgi?step=Intro', tmpl => 'login_artist.html', email => $email, password => $password, ]); # issue the request my $res = $agent->request($req); # extract the cookies $cookie_jar->extract_cookies($res); # build the request for the stats page my $req2 = GET ("http://stats.mp3.com/cgi-bin/artist-stats.cgi?band_id +=$band_id"); # add the cookies we got from the previous request $cookie_jar->add_cookie_header($req2); # issue the request $res = $agent->request($req2); if ($res->is_success) { print "Content-type: text/html\n\n"; print "<html>"; print $res->content; } else { print $res->as_string; }
Enjoy
/\/\averick