Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Live365 Broadcaster Info grabber

by thealienz1 (Pilgrim)
on Jan 18, 2001 at 08:13 UTC ( #52692=sourcecode: print w/ replies, xml ) Need Help??

Category: Web Stuff
Author/Contact Info thealienz@zdnetmail.com
Description: I was working one day on setting up an radio station on live365.com, and I noticed that their main http site was really slow. So, what I did was made a script that checks my broadcasting information really fast. Thanks PERL. Basically all you have to do is type in the username and the script does the rest for you. You do have to make sure that you do have the LWP modules installed. Otherwise I trust that you know how to use this trully useless script. Thanks PERL.
#needs these to get the html file from live365.com
use LWP::Simple;

#type in your username(aka: broadcaster's name) here
#print "Username: ";
#$username = <STDIN>;
#chomp($username);
$username="thealienz";

#Creates URL
$url = 'http://www.live365.com/cgi-bin/directory.cgi?genre=search&sear
+chdesc=' . $username . '&searchfields=H';

print "Getting Stats - ";
unless (defined ($page = get($url))) {
    die "ERROR - There was an error getting URL: $URL\n";
}
print "Done\n";

print "Profile: $usrename\n";

#Checks the description
if($page =~ m|<TD ID="desc".*?><a class="desc".*?>(.*?)</a></TD>|i) {
    print "Description:\n$1\n";
}

#Checks to see what your connection speed is
if($page =~ m|<TD ID="connection".*?>(.*?)</TD>|i) {
    print "Speed: $1\n";
}

#Checks how many people are listening
if($page =~ m|<TD ID="listen".*?>(.*?)</TD>|i) {
    if($1 =~ m|DrawListenerStars\("/scp/\.\./images/", (\d+), (\d+)\)|
+i) {
        ($listen,$outof) = ($1,$2);
    } else{
        ($listen,$outof) = split(/\//,$1);
    }
    print "Listeners: $listen / $outof\n";
}

Comment on Live365 Broadcaster Info grabber
Download Code

Back to Code Catacombs

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-12-19 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (82 votes), past polls