summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.local/share/libquvi-scripts/media/putlocker.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/.local/share/libquvi-scripts/media/putlocker.lua b/.local/share/libquvi-scripts/media/putlocker.lua
index f3abebc..e0b81b9 100644
--- a/.local/share/libquvi-scripts/media/putlocker.lua
+++ b/.local/share/libquvi-scripts/media/putlocker.lua
@@ -5,7 +5,7 @@ local Putlocker = {}
-- Identify the script.
function ident(qargs)
return {
- domains = table.concat({'putlocker.com'}, ','),
+ domains = table.concat({'putlocker.com', 'sockshare.com'}, ','),
can_parse_url = Putlocker.can_parse_url(qargs)
}
end
@@ -31,10 +31,13 @@ function Putlocker.iter_streams(c, qargs)
local S = require 'quvi/stream'
url = c:match('<a href="([^"]+)" class="download_file_link"')
+ local U = require 'socket.url'
+ local t = U.parse(qargs.input_url)
-- url,container = c:match('file:%s*"(.-/)v%.(.-)"')
- local s = S.stream_new(table.concat({"http://www.putlocker.com", url}))
- --s.container = container
+
+ local s = S.stream_new(table.concat({"http://", t.host, url}))
+ --s.container = containehttp://www.sockshare.com/file/ACCFBF032A3CD770r
return { s }
end
@@ -43,7 +46,8 @@ function Putlocker.can_parse_url(qargs)
local t = U.parse(qargs.input_url)
return t and t.scheme and t.scheme:lower():match('^http$')
- and t.host and t.host:lower():match('putlocker%.com$')
+ and t.host and (t.host:lower():match('putlocker%.com$') or
+ t.host:lower():match('sockshare%.com$'))
and t.path and t.path:match("^/file/[A-Z0-9]+")
and true or false
end