New Youtube Urls.

65 views
Skip to first unread message

Maher Kassem

unread,
Nov 20, 2010, 6:27:23 AM11/20/10
to lusca-users
Hi All,

I assume that youtube has changed their URLs do to several caches
which have stopped caching youtube videos. I stopped the url_rewrite
program in order to see the full request and write a new url_rewrite
program, but as far as I can see, the urls are the same. I must be
missing something. Is there anyone who has a url_rewrite script that
is currently working/is updated for the new youtube urls? Thanks alot.

Sincerely,
Maher.

Roelf Diedericks

unread,
Nov 20, 2010, 7:24:12 PM11/20/10
to lusca-users
Not to be funny, but it might help if you INDICATED some code, of
whatever
URL rewriter you're using, or some slightly more useful information.

Adrian Chadd

unread,
Nov 21, 2010, 2:12:40 AM11/21/10
to lusca...@googlegroups.com
:-)

Can you post the source to the url rewriter you're using?
I'd like to commit a more up to date set of rewriters to LUSCA_HEAD.
What I need are people willing to keep them up to date.


Adrian

> --
> You received this message because you are subscribed to the Google Groups "lusca-users" group.
> To post to this group, send email to lusca...@googlegroups.com.
> To unsubscribe from this group, send email to lusca-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lusca-users?hl=en.
>
>

Asif Khan

unread,
Nov 21, 2010, 7:20:08 AM11/21/10
to lusca...@googlegroups.com
Dear All,

I am using a python script videocache-1.9.2 was free from cachevideos.com , now the developer is charging US $ 149 per server bases for videocache-1.9.6.tar.gz . videocache-1.9.2 is still fully caching most of the streaming web sites but for youtube videos it was working perfectly but now its only caching 1 out of 20 request for youtube which is due to http://apiblog.youtube.com/2010/03/upcoming-change-to-youtube-video-page.html.

How ever you can download it from videocache-1.9.2

Regards,

Muhammad Asif Khan

Asif Khan

unread,
Nov 21, 2010, 7:21:55 AM11/21/10
to lusca...@googlegroups.com

Sorry I forget to mention that i am using videocache-1.9.2 with LUSCA and Squid 3.0.

Maher Kassem

unread,
Nov 21, 2010, 12:57:15 PM11/21/10
to lusca-users
----------------- start code
----------------------------

#!/usr/bin/perl
use IO::File;
use IO::Socket::INET;
use IO::Pipe;
$|=1;
while (<>) {
@X = split;
$x = $X[0];
$_ = $X[1];

# compatibility from old cached get_video?video_id
if (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*
\.video\.google\.com).*?(videoplayback\?id=.*?|video_id=.*?)\&(.*?)/)
{
$z = $2; $z =~ s/video_id=/get_video?video_id=/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" .
$z . "\n";

# youtube HD itag=22
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo
\.com|.*\.video\.google\.com).*?\&(itag=22).*?\&(id=[a-zA-Z0-9]*)/) {
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" .
$2 . "&" . $3 . "\n";

# youtube Normal screen always HD itag 35, Normal screen never HD itag
34, itag=18 <--normal?
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo
\.com|.*\.video\.google\.com).*?\&(itag=[0-9]*).*?\&(id=[a-zA-
Z0-9]*)/) {
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" .
$3 . "\n";

} else {
print $x . $_ . "\n";
}
}
---------------- end code ----------------------------

On Nov 21, 2:24 am, Roelf Diedericks <roelf.diederi...@gmail.com>
wrote:

Asif Khan

unread,
Nov 22, 2010, 1:06:48 PM11/22/10
to lusca...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages