home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 June
/
Chip_2004-06_cd1.bin
/
opsys
/
macos
/
radio
/
radio.dmg
/
RadioLover.app
/
Contents
/
Resources
/
ParseShoutcastWWW.pl
< prev
next >
Wrap
Perl Script
|
2004-03-30
|
462b
|
17 lines
#!/usr/bin/perl -w
# Input: curl www.shoutcast.com
# Output: Text file of format: URL\nRADIO STATION NAME\n...
#
# Simon Liu, 23 Oct 2002
# slurp entire input into one variable
local $/ = undef;
$slurp = <STDIN>;
# regexp to search for URL $1 and RADIO STATION NAME $2
while ( $slurp =~ /<a href=\"(\/sbin\/shoutcast-playlist\.pls.*?)\".*?<a.*?href=\".*?\">(.*?)<\/a>.*?>(\d+)<\/f/giso ) {
print $2,"\n",$3,"\n\n","http://www.shoutcast.com", $1, "\n";
}