Date: Tue, 31 Aug 2004 14:44:14 -0500 (CDT) From: Mark <boxend@redtick.homeunix.com> To: freebsd-multimedia@freebsd.org Subject: re:launchcast Message-ID: <200408311944.i7VJiEck037895@redtick.homeunix.com>
next in thread | raw e-mail | index | archive | help
more info on my own request: found this perl script on hacks.oreilly.com, but no joy #!/usr/bin/perl # Written by badfugu - October 2003 # I do claim some ownership, but please distribute freely. require LWP::UserAgent; require HTTP::Request; require HTTP::Response; # Get video ID from input my $vid_id = $ARGV[0]; print "Video ID: $vid_id\n"; ($vid_id <= 0) and die "Invalid video ID!\n"; # Build the first URL my $pri_url_head = "http://launchtoday.launch.yahoo.com/player/showasx.asp?cid=1&pid=4&csid=396500550&sx=g%2F4.xml&sgm=1&vid="; my $pri_url_tail = "&bw=300&pv=6&bp=Windows%209x&uid=1486187332&uguid=8bodoh10e6o4n&im=0&pls=&asp=&fcv=&z=y.asx"; my $pri_url = $pri_url_head . $vid_id . $pri_url_tail; # Attempt to fetch the playlist (asx) from that URL print "Attempting to fetch from showasx.asp...\n"; my %options = ( agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)' ); my $ua = LWP::UserAgent->new( %options ); my $request = new HTTP::Request 'GET', $pri_url; my $response = $ua->request($request); if (!($response->is_success)) { die "Could not fetch!\n"; } # Extract second url from response my $sec_url = ""; if ($response->content =~ /(http:.+medialog.+$vid_id.+asx)/) { $sec_url = "$1"; } else { die "Could not extract medialog.asp url!\n"; } # Attempt to fetch the next playlist from the secondary URL print "Attempting to fetch from medialog.asp...\n"; my $mkpl_url = ""; $request->url($sec_url); $response = $ua->request($request); if (!($response->is_success)) { die "Could not fetch!\n"; } else { $mkpl_url = $response->content; } # Attempt to fetch the media stream URL print "Attempting to fetch from makeplaylist.dll...\n"; $request->url($mkpl_url); $response = $ua->request($request); if (!($response->is_success)) { die "Could not fetch!\n"; } else { $mms_url = $response->content; } # Play that stream!!! system("mplayer -bandwidth 99999999 $mms_url"); # eof ########################################################### This being the error msg : Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.4/mach /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.4/BSDPAN /usr/local/lib/perl5/5.8.4/mach /usr/local/lib/perl5/5.8.4 .) at ./launch.pl line 5. Are PAN mods not loaded with the perl5.8? or is this something diff??
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408311944.i7VJiEck037895>