summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2014-02-07 13:33:50 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2014-02-07 13:36:57 +0100
commitdcf2fe944db0664ee6d494185b4802ea23418d53 (patch)
treeb6d7e0fb42ec56dee337aa65f02828f7c10d3070 /.local
parent6692c6f9521cf497963ccfda298f7d754e39843f (diff)
downloaddotfiles-dcf2fe944db0664ee6d494185b4802ea23418d53.tar.gz
dotfiles-dcf2fe944db0664ee6d494185b4802ea23418d53.tar.bz2
dotfiles-dcf2fe944db0664ee6d494185b4802ea23418d53.zip
quvi/xvidstage: Improve the matching of the relevant minjs
Diffstat (limited to '.local')
-rw-r--r--.local/share/libquvi-scripts/media/xvidstage.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/share/libquvi-scripts/media/xvidstage.lua b/.local/share/libquvi-scripts/media/xvidstage.lua
index e2b1b51..1312e96 100644
--- a/.local/share/libquvi-scripts/media/xvidstage.lua
+++ b/.local/share/libquvi-scripts/media/xvidstage.lua
@@ -69,11 +69,11 @@ function Xvidstage.iter_streams(c, qargs)
return { s }
end
- local packed = c:match("<div id=\"player_code\"><script[^>]+>([^\n]+)")
+ local pattern = string.rep('[a-z0-9]', 56)
+ local packed = c:match("(function%(p,a,c,k,e,d%)[^\n]+"..pattern.."[^\n]+)%)")
c = Xvidstage.unpack_minjs(packed)
- local id_pattern = string.rep('[a-z0-9]', 56)
- url,ext = c:match('["\'](http://[^"\']+/d/'..id_pattern..'/)video%.(.-)["\']')
+ url,ext = c:match('["\'](http://[^"\']+/d/'..pattern..'/)video%.(.-)["\']')
local s = S.stream_new(table.concat({url, qargs.title}))
s.container = ext
return { s }