diff --git a/net/yt/Makefile b/net/yt/Makefile index 301168d020e..80b9f1c27bd 100644 --- a/net/yt/Makefile +++ b/net/yt/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.5 2007/06/19 17:32:52 pedro Exp $ +# $OpenBSD: Makefile,v 1.6 2007/06/23 05:16:22 sturm Exp $ COMMENT= "customizable script to fetch youtube videos" -PKGNAME= yt-4 +PKGNAME= yt-5 CATEGORIES= net DISTFILES= diff --git a/net/yt/files/yt.lua b/net/yt/files/yt.lua index 5ad5097ebb8..0e74da3bbb4 100644 --- a/net/yt/files/yt.lua +++ b/net/yt/files/yt.lua @@ -1,5 +1,5 @@ #!%%LOCALBASE%%/bin/lua --- $OpenBSD: yt.lua,v 1.3 2007/06/19 17:32:52 pedro Exp $ +-- $OpenBSD: yt.lua,v 1.4 2007/06/23 05:16:22 sturm Exp $ -- Fetch videos from YouTube.com and convert them to MPEG. -- Written by Pedro Martelletto in August 2006. Public domain. -- Example: lua yt.lua http://www.youtube.com/watch?v=c5uoo1Kl_uA @@ -28,6 +28,7 @@ title = assert(string.match(body, pattern)) -- Build a name for the files the video will be stored in. file = string.gsub(title, " ", "_") +file = string.gsub(title, "[^%w-]", "_") file = "youtube-" .. string.lower(file) flv = file .. ".flv" avi = file .. ".avi"