From 89998b09d981975bac731304df034d4e57a88ede Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 14 Sep 2013 11:07:29 +0200 Subject: Add quvi script for ulmen.tv Currently only handles stuckrad-barre videos. --- .local/share/libquvi-scripts/lua/website/quvi | 1 + .../share/libquvi-scripts/lua/website/ulmentv.lua | 45 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 120000 .local/share/libquvi-scripts/lua/website/quvi create mode 100644 .local/share/libquvi-scripts/lua/website/ulmentv.lua (limited to '.local/share') diff --git a/.local/share/libquvi-scripts/lua/website/quvi b/.local/share/libquvi-scripts/lua/website/quvi new file mode 120000 index 0000000..bd3c155 --- /dev/null +++ b/.local/share/libquvi-scripts/lua/website/quvi @@ -0,0 +1 @@ +/usr/share/libquvi-scripts/lua/website/quvi/ \ No newline at end of file diff --git a/.local/share/libquvi-scripts/lua/website/ulmentv.lua b/.local/share/libquvi-scripts/lua/website/ulmentv.lua new file mode 100644 index 0000000..2173c96 --- /dev/null +++ b/.local/share/libquvi-scripts/lua/website/ulmentv.lua @@ -0,0 +1,45 @@ +-- Identify the script. +function ident(self) + package.path = self.script_dir .. '/?.lua' + local C = require 'quvi/const' + local r = {} + r.domain = "ulmen%.tv" + r.formats = "default|best" + r.categories = C.proto_rtmp + local U = require 'quvi/util' + r.handles = U.handles(self.page_url, {r.domain}, {"/stuckrad%-barre/%d+/.+$"}) + return r +end + +-- Query available formats. +function query_formats(self) + self.formats = "default|best" + + return self +end + +-- Parse media URL. +function parse(self) + self.host_id = "ulmentv" + + local c = quvi.fetch(self.page_url, {fetch_type='config'}) + if c:match('') then + local s = c:match('(.-)[\n<]') + error( (not s) and "no match: error message" or s ) + end + + self.title = c:match('