[vlc-commits] youtube_homepage.lua: remove broken script

Pierre Ynard git at videolan.org
Mon Oct 31 21:30:26 CET 2016


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Oct 31 21:30:01 2016 +0100| [66229ae7208798604abc94514ea13ebc9289fb3e] | committer: Pierre Ynard

youtube_homepage.lua: remove broken script

This must have long been broken, also if anything this should really be
a service discovery script instead.

Ref. #17488

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66229ae7208798604abc94514ea13ebc9289fb3e
---

 share/Makefile.am                       |  2 --
 share/lua/playlist/README.txt           |  1 -
 share/lua/playlist/youtube_homepage.lua | 53 ---------------------------------
 3 files changed, 56 deletions(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index 63da4d2..e0303ab 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -159,7 +159,6 @@ nobase_vlclib_DATA = \
 	lua/playlist/vimeo.luac \
 	lua/playlist/vocaroo.luac \
 	lua/playlist/youtube.luac \
-	lua/playlist/youtube_homepage.luac \
 	lua/playlist/zapiks.luac \
 	lua/sd/fmc.luac \
 	lua/sd/icecast.luac \
@@ -251,7 +250,6 @@ EXTRA_DIST += \
 	lua/playlist/vimeo.lua \
 	lua/playlist/vocaroo.lua \
 	lua/playlist/youtube.lua \
-	lua/playlist/youtube_homepage.lua \
 	lua/playlist/zapiks.lua \
 	lua/sd/README.txt \
 	lua/sd/fmc.lua \
diff --git a/share/lua/playlist/README.txt b/share/lua/playlist/README.txt
index e3cafbc..26b48b7 100644
--- a/share/lua/playlist/README.txt
+++ b/share/lua/playlist/README.txt
@@ -4,7 +4,6 @@ $Id$
 See lua/README.txt for generic documentation about Lua usage in VLC.
 
 Examples: See dailymotion.lua, metacafe.lua, youtube.lua
-          and youtube_homepage.lua .
 
 VLC Lua playlist modules should define two functions:
  * probe(): returns true if we want to handle the playlist in this script
diff --git a/share/lua/playlist/youtube_homepage.lua b/share/lua/playlist/youtube_homepage.lua
deleted file mode 100644
index 533e558..0000000
--- a/share/lua/playlist/youtube_homepage.lua
+++ /dev/null
@@ -1,53 +0,0 @@
---[[
-  Parse YouTube homepage and browse pages. Next step is to recode firefox
-  in VLC ... using Lua of course ;)
-
- $Id$
-
- Copyright © 2007 the VideoLAN team
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
---]]
-
-function probe()
-    return vlc.access == "http" and ( string.match( vlc.path, "youtube.com/%?$" ) or string.match( vlc.path, "youtube.com/browse" ) )
-end
-
-function parse()
-    p = {}
-    while true
-    do
-        line = vlc.readline()
-        if not line then break end
-        for _path, _artist, _name in string.gmatch( line, "href=\"(/watch%?v=[^\"]*)\" onclick=\"_hbLink%('([^']*)','Vid[^\']*'%);\">([^<]*)</a><br/>" )
-        do
-            path = "http://www.youtube.com" .. _path
-            name = vlc.strings.resolve_xml_special_chars( _name )
-            artist = _artist
-        end
-        for _min, _sec in string.gmatch( line, "<span class=\"runtime\">(%d*):(%d*)</span>" )
-        do
-            duration = 60 * _min + _sec
-        end
-        if path and name and artist and duration then
-            table.insert( p, { path = path; name = name; artist = artist; duration = duration } )
-            path = nil
-            name = nil
-            artist = nil
-            duration = nil
-        end
-    end
-    return p
-end



More information about the vlc-commits mailing list