From d9d89b6b25f01f57c8852fec76a3ab9159caba3d Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 25 Aug 2011 23:28:46 +0300 Subject: [PATCH] Remove pornhub.lua * Remove share/Makefile.am entry * Remove test JSON --- share/Makefile.am | 1 - share/lua/website/pornhub.lua | 61 ----------------------------- tests/data/format/default/nsfw/pornhub.json | 16 -------- 3 files changed, 78 deletions(-) delete mode 100644 share/lua/website/pornhub.lua delete mode 100644 tests/data/format/default/nsfw/pornhub.json diff --git a/share/Makefile.am b/share/Makefile.am index acb3e71..ca84125 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -56,7 +56,6 @@ lua/website/tube8.lua \ lua/website/xhamster.lua \ lua/website/xvideos.lua \ lua/website/youjizz.lua \ -lua/website/pornhub.lua \ lua/website/spankwire.lua \ lua/website/totallynsfw.lua endif diff --git a/share/lua/website/pornhub.lua b/share/lua/website/pornhub.lua deleted file mode 100644 index c5c0d84..0000000 --- a/share/lua/website/pornhub.lua +++ /dev/null @@ -1,61 +0,0 @@ - --- quvi --- Copyright (C) 2011 quvi project --- --- This file is part of quvi . --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License, or (at your option) any later version. --- --- This library 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 --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA --- 02110-1301 USA --- - --- Identify the script. -function ident(self) - package.path = self.script_dir .. '/?.lua' - local C = require 'quvi/const' - local r = {} - r.domain = "pornhub.com" - r.formats = "default" - r.categories = C.proto_http - local U = require 'quvi/util' - r.handles = U.handles(self.page_url, - {r.domain}, {"view_video.php"}, {"viewkey=%w+"}) - return r -end - --- Query available formats. -function query_formats(self) - self.formats = 'default' - return self -end - --- Parse media URL. -function parse(self) - self.host_id = "pornhub" - local page = quvi.fetch(self.page_url) - - local _,_,s = page:find('class="video%-title%-nf" style=".-"><%w+>(.-)<') - self.title = s or error("no match: media title") - - local _,_,s = page:find('"video_url","(.-)"') - local U = require 'quvi/util' - self.url = {U.unescape(s) or error("no match: media url")} - - local _,_,s = self.page_url:find('viewkey=(%w+)') - self.id = s or error("no match: media id") - - return self -end - --- vim: set ts=4 sw=4 tw=72 expandtab: diff --git a/tests/data/format/default/nsfw/pornhub.json b/tests/data/format/default/nsfw/pornhub.json deleted file mode 100644 index 2efd962..0000000 --- a/tests/data/format/default/nsfw/pornhub.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "host": "pornhub", - "page_title": "Flashes, Lights, Action...", - "page_url": "http://www.pornhub.com/view_video.php?viewkey=1268225494", - "id": "1268225494", - "format_requested": "default", - "link": [ - { - "id": "1", - "length_bytes": "11875450", - "content_type": "video/x-flv", - "file_suffix": "flv", - "url": "" - } - ] -} -- 2.11.4.GIT