Re: [squid-users] YouTube and other streaming media (caching)

From: Horacio Herrera Gonzalez <pokehorace_at_gmail.com>
Date: Tue, 10 Jun 2008 11:26:56 -0500

Thanks! I've opened the bugzilla ticket.

BTW, the script is in perl, I forgot the first line of the script (sorry!):

---------------------------------
#!/usr/bin/perl
$|=1;
while (<>) {
  @X = split;
  $url = $X[0];
  $url =~ s@^http://(.*?)/get_video\?(.*)video_id=(.*?)&.*@squid://videos.youtube.INTERNAL/ID=$3@;
  $url =~ s@^http://(.*?)/get_video\?(.*)video_id=(.*?)$@squid://videos.youtube.INTERNAL/ID=$3@;
  $url =~ s@^http://(.*?)/videodownload\?(.*)docid=(.*?)$@squid://videos.google.INTERNAL/ID=$3@;
  $url =~ s@^http://(.*?)/videodownload\?(.*)docid=(.*?)&.*@squid://videos.google.INTERNAL/ID=$3@;

# Uncomment this if the use of "squid://" is unaceptable:
# $url =~ s@^squid://@^http://@;

  print "$url\n";
}
Received on Tue Jun 10 2008 - 16:27:05 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 10 2008 - 12:00:03 MDT