From e66749281356d81a7e4e35decec01296dec88a8e Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 9 May 2013 01:16:34 +0300 Subject: [PATCH] Remove website/yfrog.lua This is primarily an image host [?]. The website provides direct links to media. Not really our cup of tea. Signed-off-by: Toni Gundogdu --- share/Makefile.am | 1 - share/lua/website/yfrog.lua | 63 ------------------------------------ tests/data/format/default/yfrog.json | 17 ---------- 3 files changed, 81 deletions(-) delete mode 100644 share/lua/website/yfrog.lua delete mode 100644 tests/data/format/default/yfrog.json diff --git a/share/Makefile.am b/share/Makefile.am index 0924186..31ec9fc 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -54,7 +54,6 @@ DIST_lua=\ lua/website/vimeo.lua \ lua/website/wdrmaus.lua \ lua/website/wimp.lua \ - lua/website/yfrog.lua \ lua/website/youtube.lua if WITH_NSFW diff --git a/share/lua/website/yfrog.lua b/share/lua/website/yfrog.lua deleted file mode 100644 index 6f454b3..0000000 --- a/share/lua/website/yfrog.lua +++ /dev/null @@ -1,63 +0,0 @@ - --- libquvi-scripts --- Copyright (C) 2011 Toni Gundogdu --- --- This file is part of libquvi-scripts . --- --- 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 = "yfrog%.com" - r.formats = "default" - r.categories = C.proto_http - local U = require 'quvi/util' - r.handles = U.handles(self.page_url, {r.domain}, {"/%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 = "yfrog" - - self.id = self.page_url:match('%.com/(%w+)') - or error('no match: media id') - - local page = quvi.fetch(self.page_url) - - self.title = page:match('(.-)') - or error('no match: media title') - - self.thumbnail_url = page:match('"og:image" content="(.-)"') - or '' - - self.url = {page:match('input class="readonly" value="(.-)"') - or error('no match: media url')} - - return self -end - --- vim: set ts=4 sw=4 tw=72 expandtab: diff --git a/tests/data/format/default/yfrog.json b/tests/data/format/default/yfrog.json deleted file mode 100644 index 03f0f29..0000000 --- a/tests/data/format/default/yfrog.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "host": "yfrog", - "page_title": "Here's Sky' political guy, falling into the Jeremy C...Hunt trap.", - "page_url": "http://yfrog.com/j1wpgz", - "id": "j1wpgz", - "format_requested": "default", - "thumbnail_url": "http://desmond.yfrog.com/Himg685/scaled.php?server=685&filename=wpg.mp4&res=crop", - "link": [ - { - "id": "1", - "length_bytes": "2348210", - "content_type": "video/mp4", - "file_suffix": "mp4", - "url": "" - } - ] -} -- 2.11.4.GIT