catch up pattern to the new google video format. don't include
thumbnailUrl. makes google videos fetch again - reported by jsg@.
This commit is contained in:
parent
5ac8851ec7
commit
e24e9e0e64
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.31 2009/09/13 18:23:11 martynas Exp $
|
||||
# $OpenBSD: Makefile,v 1.32 2009/09/18 21:10:03 martynas Exp $
|
||||
|
||||
COMMENT= fetch youtube and google videos
|
||||
|
||||
PKGNAME= yt-12
|
||||
PKGNAME= yt-13
|
||||
CATEGORIES= net www
|
||||
DISTFILES=
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!${LOCALBASE}/bin/lua
|
||||
-- $OpenBSD: yt.lua,v 1.25 2009/09/13 18:23:11 martynas Exp $
|
||||
-- $OpenBSD: yt.lua,v 1.26 2009/09/18 21:10:03 martynas Exp $
|
||||
-- Fetch videos from YouTube.com/Videos.Google.com, and convert to MPEG.
|
||||
-- Written by Pedro Martelletto and Martynas Venckus. Public domain.
|
||||
-- Example: lua yt.lua http://www.youtube.com/watch?v=c5uoo1Kl_uA
|
||||
@ -126,7 +126,7 @@ for i = 1, table.getn(urls) do
|
||||
.. "&t=" .. t .. fmt)
|
||||
else
|
||||
-- We assume it's Google Video URL.
|
||||
pattern = "'/googleplayer.swf%?videoUrl(.-)'"
|
||||
pattern = "/googleplayer.swf%?videoUrl(.-)thumbnailUrl"
|
||||
url = assert(string.match(body, pattern))
|
||||
url = string.gsub (url, "\\x", "%%")
|
||||
url = string.gsub (url, "%%(%x%x)", function(h)
|
||||
|
Loading…
Reference in New Issue
Block a user