in reply to mp3.com stats
Now, back to the issue at hand - mp3's artist log-in URL is https://login.mp3.com/login?origin=artist. I wrote the following piece of test code to see if I could simply dump the contents:#cookies.pl #usage cookies.pl [site] - specify site or leave null for all use strict; use Term::ANSIColor; my $site = $ARGV[0]; my %values; open(COOKIE, "$ENV{HOME}/.netscape/cookies") or die "Yack!: $!\n"; while (<COOKIE>) { next if ($_ =~ /^[#\n]/); chomp; my ($domain, $x, $path, $x, $x, $key, $value) = split(/\t/, $_ +); $values{$domain}{$key} = $value; } foreach my $d (sort keys %values) { next unless !($site) or $d =~ /$site/; print color("underline"), "$d", color("reset"), "\n"; foreach my $k (sort keys %{$values{$d}}) { print "\t", color("green"), "$k"; print color("reset"), " => "; print color("yellow"), $values{$d}{$k}; print color("reset"), "\n"; } }
And I get this as a result (abbreviated): 501 Protocol scheme 'https' is not supported. Wow. If you replace https with plain old http a 302 error is returned. If anyone can give a suggestion/alternate route, I would greatly appreciate it.#grabme.pl use strict; use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Cookies; # instant a new agent my $agent = new LWP::UserAgent; $agent->agent("Mozilla/4.7 [en] (X11; I; Linux 2.2.13-mosix i686; Nav) +"); # issue a request for the web page my $req = GET("https://login.mp3.com/login?orgin=artist"); my $res = $agent->request($req); if ($res->is_success) { print $res->content; } else { print $res->error_as_HTML; }
In the meantime I will continue to work on this admin page display thingy. I take it that you are wanting to get a list of songs from the Artist Admin Page, feed each one via a GET or POST request to their CGI engine, and print the stats. Great idea, because it is a timely process to do so via a web browser.
<SHAMELESS PLUG>
my music
</SHAMELESS PLUG>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: mp3.com stats
by mdillon (Priest) on Jul 02, 2000 at 20:29 UTC |