Without the following youtube gives 403s when downloading after recent youtube changes.
Index: Makefile =================================================================== RCS file: /cvs/ports/net/yt/Makefile,v retrieving revision 1.46 diff -u -p -r1.46 Makefile --- Makefile 19 Sep 2012 08:15:09 -0000 1.46 +++ Makefile 29 Sep 2012 14:25:31 -0000 @@ -4,8 +4,7 @@ PKG_ARCH = * COMMENT= fetch YouTube and Google videos -PKGNAME= yt-19 -REVISION= 1 +PKGNAME= yt-20 CATEGORIES= net www DISTFILES= Index: files/yt.lua =================================================================== RCS file: /cvs/ports/net/yt/files/yt.lua,v retrieving revision 1.35 diff -u -p -r1.35 yt.lua --- files/yt.lua 6 Aug 2012 09:47:20 -0000 1.35 +++ files/yt.lua 29 Sep 2012 14:25:31 -0000 @@ -113,6 +113,11 @@ for i = 1, table.getn(urls) do body = table.concat(t) body = url_decode(body) encurl = string.match(body, "url=(http[^,=&]-cache.-type.-)[&;]") + -- signature + sig = string.match(body, "sig=(.-)&") + if sig then + encurl = encurl .. "&signature=" .. sig + end url = string.format("\"%s\"", encurl) else -- We assume it's Google Video URL.