summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hooks/BypassCaptcha.py4
-rwxr-xr-xmodule/plugins/hooks/Captcha9kw.py4
-rw-r--r--module/plugins/hooks/CaptchaTrader.py4
-rw-r--r--module/plugins/hooks/ExtractArchive.py4
-rw-r--r--module/plugins/hooks/ImageTyperz.py4
-rw-r--r--module/plugins/hooks/RestartFailed.py137
-rw-r--r--module/plugins/hoster/FilezyNet.py33
-rw-r--r--module/plugins/hoster/UploadheroCom.py3
-rw-r--r--module/plugins/hoster/VeehdCom.py6
-rw-r--r--module/plugins/hoster/XHamsterCom.py4
-rw-r--r--module/plugins/hoster/Xdcc.py8
-rw-r--r--module/plugins/hoster/YoutubeCom.py8
-rw-r--r--module/plugins/hoster/ZippyshareCom.py13
13 files changed, 90 insertions, 142 deletions
diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py
index 24ad17dd8..e24a439af 100644
--- a/module/plugins/hooks/BypassCaptcha.py
+++ b/module/plugins/hooks/BypassCaptcha.py
@@ -41,9 +41,9 @@ class BypassCaptchaException(Exception):
class BypassCaptcha(Hook):
__name__ = "BypassCaptcha"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """send captchas to BypassCaptcha.com"""
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated", "bool", "Activated", False),
("force", "bool", "Force BC even if client is connected", False),
("passkey", "password", "Passkey", "")]
__author_name__ = ("RaNaN", "Godofdream", "zoidberg")
diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py
index bb2b8c862..f7226fc59 100755
--- a/module/plugins/hooks/Captcha9kw.py
+++ b/module/plugins/hooks/Captcha9kw.py
@@ -30,9 +30,9 @@ from module.plugins.Hook import Hook
class Captcha9kw(Hook):
__name__ = "Captcha9kw"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """send captchas to 9kw.eu"""
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated", "bool", "Activated", False),
("force", "bool", "Force CT even if client is connected", True),
("https", "bool", "Enable HTTPS", "False"),
("confirm", "bool", "Confirm Captcha", "False"),
diff --git a/module/plugins/hooks/CaptchaTrader.py b/module/plugins/hooks/CaptchaTrader.py
index 2b8a50a8e..c648c0bd8 100644
--- a/module/plugins/hooks/CaptchaTrader.py
+++ b/module/plugins/hooks/CaptchaTrader.py
@@ -46,9 +46,9 @@ class CaptchaTraderException(Exception):
class CaptchaTrader(Hook):
__name__ = "CaptchaTrader"
- __version__ = "0.14"
+ __version__ = "0.15"
__description__ = """send captchas to captchatrader.com"""
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated", "bool", "Activated", False),
("username", "str", "Username", ""),
("force", "bool", "Force CT even if client is connected", False),
("passkey", "password", "Password", ""),]
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index a5a973b7f..f55589fec 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -58,7 +58,7 @@ class ExtractArchive(Hook):
Provides: unrarFinished (folder, filename)
"""
__name__ = "ExtractArchive"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = "Extract different kind of archives"
__config__ = [("activated", "bool", "Activated", True),
("fullpath", "bool", "Extract full path", True),
@@ -153,7 +153,7 @@ class ExtractArchive(Hook):
out = save_join(dl, p.folder, self.getConfig("destination"), "")
#relative to package folder if destination is relative, otherwise absolute path overwrites them
- if self.getConf("subfolder"):
+ if self.getConfig("subfolder"):
out = join(out, fs_encode(p.folder))
if not exists(out):
diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py
index 59b6334a7..f8f515113 100644
--- a/module/plugins/hooks/ImageTyperz.py
+++ b/module/plugins/hooks/ImageTyperz.py
@@ -42,9 +42,9 @@ class ImageTyperzException(Exception):
class ImageTyperz(Hook):
__name__ = "ImageTyperz"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """send captchas to ImageTyperz.com"""
- __config__ = [("activated", "bool", "Activated", True),
+ __config__ = [("activated", "bool", "Activated", False),
("username", "str", "Username", ""),
("passkey", "password", "Password", ""),
("force", "bool", "Force IT even if client is connected", False)]
diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py
index 7ee53deb9..b8339e9e3 100644
--- a/module/plugins/hooks/RestartFailed.py
+++ b/module/plugins/hooks/RestartFailed.py
@@ -1,124 +1,31 @@
- # -*- coding: utf-8 -*-
-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- @author: Walter Purcaro
-"""
+# -*- coding: utf-8 -*-
from module.plugins.Hook import Hook
-from time import time
-
class RestartFailed(Hook):
__name__ = "RestartFailed"
- __version__ = "1.5"
- __description__ = "Automatically restart failed/aborted downloads"
- __config__ = [
- ("activated", "bool", "Activated", "True"),
- ("dlFail", "bool", "Restart when download fail", "True"),
- ("dlFail_n", "int", "Only when failed downloads are at least", "5"),
- ("dlFail_i", "int", "Only when elapsed time since last restart is (min)", "10"),
- ("dlPrcs", "bool", "Restart after all downloads are processed", "True"),
- ("recnt", "bool", "Restart after reconnecting", "True"),
- ("rsLoad", "bool", "Restart on plugin activation", "False")
- ]
- __author_name__ = ("Walter Purcaro")
- __author_mail__ = ("vuolter@gmail.com")
-
- def restart(self, arg=None):
- # self.logDebug("self.restart")
- self.info["timerflag"] = False
- self.info["dlfailed"] = 0
- self.core.api.restartFailed()
- self.logDebug("self.restart: self.core.api.restartFailed")
- self.info["lastrstime"] = time()
-
- def periodical(self):
- # self.logDebug("self.periodical")
- if self.info["timerflag"]:
- self.restart()
-
- def checkInterval(self, arg=None):
- # self.logDebug("self.checkInterval")
- now = time()
- lastrstime = self.info["lastrstime"]
- interval = self.getConfig("dlFail_i") * 60
- if now < lastrstime + interval:
- self.info["timerflag"] = True
- else:
- self.restart()
-
- def checkFailed(self, pyfile):
- # self.logDebug("self.checkFailed")
- self.info["dlfailed"] += 1
- curr = self.info["dlfailed"]
- max = self.getConfig("dlFail_n")
- if curr >= max:
- self.checkInterval()
-
- def addEvent(self, event, handler):
- if event in self.manager.events:
- if handler not in self.manager.events[event]:
- self.manager.events[event].append(handler)
- # self.logDebug("self.addEvent: " + event + ": added handler")
- else:
- # self.logDebug("self.addEvent: " + event + ": NOT added handler")
- return False
- else:
- self.manager.events[event] = [handler]
- # self.logDebug("self.addEvent: " + event + ": added event and handler")
- return True
+ __version__ = "1.51"
+ __description__ = "restartedFailed Packages after defined time"
+ __config__ = [("activated", "bool", "Activated" , "False"),
+ ("interval", "int", "Interval in Minutes", "15") ]
+
+ __author_name__ = ("bambie")
+ __author_mail__ = ("bambie@gulli.com")
- def removeEvent(self, event, handler):
- if event in self.manager.events and handler in self.manager.events[event]:
- self.manager.events[event].remove(handler)
- # self.logDebug("self.removeEvent: " + event + ": removed handler")
- return True
- else:
- # self.logDebug("self.removeEvent: " + event + ": NOT removed handler")
- return False
+ interval = 300
- def configEvents(self, plugin=None, name=None, value=None):
- # self.logDebug("self.configEvents")
- self.interval = self.getConfig("dlFail_i") * 60
- dlFail = self.getConfig("dlFail")
- dlPrcs = self.getConfig("dlPrcs")
- recnt = self.getConfig("recnt")
- if dlPrcs:
- self.addEvent("allDownloadsProcessed", self.checkInterval)
- else:
- self.removeEvent("allDownloadsProcessed", self.checkInterval)
- if not dlFail:
- self.info["timerflag"] = False
- if recnt:
- self.addEvent("afterReconnecting", self.restart)
- else:
- self.removeEvent("afterReconnecting", self.restart)
-
- def unload(self):
- # self.logDebug("self.unload")
- self.removeEvent("pluginConfigChanged", self.configEvents)
- self.removeEvent("downloadFailed", self.checkFailed)
- self.removeEvent("allDownloadsProcessed", self.checkInterval)
- self.removeEvent("afterReconnecting", self.restart)
+ def setup(self):
+ self.info = {"running": False}
def coreReady(self):
- # self.logDebug("self.coreReady")
- self.info = {"dlfailed": 0, "lastrstime": 0, "timerflag": False}
- if self.getConfig("rsLoad"):
- self.restart()
- self.addEvent("downloadFailed", self.checkFailed)
- self.addEvent("pluginConfigChanged", self.configEvents)
- self.configEvents()
+ self.info["running"] = True
+ self.logInfo("loaded")
+ self.interval = self.getConfig("interval") * 60
+ self.logDebug("interval is set to %s", self.interval)
+
+ def periodical(self):
+ self.logDebug("periodical called")
+ if self.getConfig("interval") * 60 != self.interval:
+ self.interval = self.getConfig("interval") * 60
+ self.logDebug("interval is set to %s", self.interval)
+ self.core.api.restartFailed()
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
new file mode 100644
index 000000000..7c5729c2d
--- /dev/null
+++ b/module/plugins/hoster/FilezyNet.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+import re
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+
+class FilezyNet(XFileSharingPro):
+ __name__ = "FilezyNet"
+ __type__ = "hoster"
+ __version__ = "0.1"
+ __pattern__ = r"http://filezy.net/.*/.*.html"
+ __description__ = """filezy.net hoster plugin"""
+
+ HOSTER_NAME = "filezy.net"
+
+ FILE_SIZE_PATTERN = r'<span class="plansize">(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</span>'
+ WAIT_PATTERN = r'<div id="countdown_str" class="seconds">\n<!--Wait--> <span id=".*?">(\d+)</span>'
+ DOWNLOAD_JS_PATTERN = r"<script type='text/javascript'>eval(.*)"
+
+ def setup(self):
+ self.resumeDownload = True
+ self.multiDL = self.premium
+
+ def getDownloadLink(self):
+ self.logDebug("Getting download link")
+
+ data = self.getPostParameters()
+ self.html = self.load(self.pyfile.url, post = data, ref = True, decode = True)
+
+ obfuscated_js = re.search(self.DOWNLOAD_JS_PATTERN, self.html)
+ dl_file_now = self.js.eval(obfuscated_js.group(1))
+ link = re.search(self.DIRECT_LINK_PATTERN, dl_file_now)
+ return link.group(1)
+
+getInfo = create_getInfo(FilezyNet)
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index 502f849af..a2348b9f9 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -16,6 +16,9 @@
@author: zoidberg
"""
+# Test link (random.bin):
+# http://uploadhero.co/dl/wQBRAVSM
+
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 23048b831..d4422afc3 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -11,7 +11,7 @@ class VeehdCom(Hoster):
('filename_spaces', 'bool', "Allow spaces in filename", 'False'),
('replacement_char', 'str', "Filename replacement character", '_'),
]
- __version__ = '0.2'
+ __version__ = '0.21'
__description__ = """Veehd.com Download Hoster"""
__author_name__ = ('cat')
__author_mail__ = ('cat@pyload')
@@ -55,12 +55,12 @@ class VeehdCom(Hoster):
name = match.group(1)
# replace unwanted characters in filename
- if self.getConf('filename_spaces'):
+ if self.getConfig('filename_spaces'):
pattern = '[^0-9A-Za-z\.\ ]+'
else:
pattern = '[^0-9A-Za-z\.]+'
- name = re.sub(pattern, self.getConf('replacement_char'),
+ name = re.sub(pattern, self.getConfig('replacement_char'),
name)
return name + '.avi'
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index 0779a78e6..866c5da45 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -17,7 +17,7 @@ class XHamsterCom(Hoster):
__name__ = "XHamsterCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?xhamster\.com/movies/.+"
- __version__ = "0.1"
+ __version__ = "0.11"
__config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]
__description__ = """XHamster.com Video Download Hoster"""
@@ -31,7 +31,7 @@ class XHamsterCom(Hoster):
self.offline()
if self.getConfig("type"):
- self.desired_fmt = self.getConf("type")
+ self.desired_fmt = self.getConfig("type")
self.pyfile.name = self.get_file_name() + self.desired_fmt
self.download(self.get_file_url())
diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py
index 6f0a1b176..3e66b966a 100644
--- a/module/plugins/hoster/Xdcc.py
+++ b/module/plugins/hoster/Xdcc.py
@@ -32,7 +32,7 @@ from module.plugins.Hoster import Hoster
class Xdcc(Hoster):
__name__ = "Xdcc"
- __version__ = "0.3"
+ __version__ = "0.31"
__pattern__ = r'xdcc://.*?(/#?.*?)?/.*?/#?\d+/?' # xdcc://irc.Abjects.net/#channel/[XDCC]|Shit/#0004/
__type__ = "hoster"
__config__ = [
@@ -91,9 +91,9 @@ class Xdcc(Hoster):
chan = m.group(2)
bot = m.group(3)
pack = m.group(4)
- nick = self.getConf('nick')
- ident = self.getConf('ident')
- real = self.getConf('realname')
+ nick = self.getConfig('nick')
+ ident = self.getConfig('ident')
+ real = self.getConfig('realname')
temp = server.split(':')
ln = len(temp)
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 70db597cf..e3eddf638 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -34,7 +34,7 @@ class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
__pattern__ = r"https?://(?:[^/]*?)youtube\.com/watch.*?[?&]v=.*"
- __version__ = "0.32"
+ __version__ = "0.33"
__config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting", "hd"),
("fmt", "int", "FMT/ITAG Number (5-102, 0 for auto)", 0),
(".mp4", "bool", "Allow .mp4", True),
@@ -83,17 +83,17 @@ class YoutubeCom(Hoster):
self.tempOffline()
#get config
- use3d = self.getConf("3d")
+ use3d = self.getConfig("3d")
if use3d:
quality = {"sd":82,"hd":84,"fullhd":85,"240p":83,"360p":82,"480p":82,"720p":84,"1080p":85,"3072p":85}
else:
quality = {"sd":18,"hd":22,"fullhd":37,"240p":5,"360p":18,"480p":35,"720p":22,"1080p":37,"3072p":38}
- desired_fmt = self.getConf("fmt")
+ desired_fmt = self.getConfig("fmt")
if desired_fmt and desired_fmt not in self.formats:
self.logWarning("FMT %d unknown - using default." % desired_fmt)
desired_fmt = 0
if not desired_fmt:
- desired_fmt = quality.get(self.getConf("quality"), 18)
+ desired_fmt = quality.get(self.getConfig("quality"), 18)
#parse available streams
streams = re.search(r'"url_encoded_fmt_stream_map": "(.*?)",', html).group(1)
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 84974e7ba..756a92ef3 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -10,10 +10,10 @@ class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
__pattern__ = r"(?P<HOST>http://www\d{0,2}\.zippyshare.com)/v(?:/|iew.jsp.*key=)(?P<KEY>\d+)"
- __version__ = "0.37"
+ __version__ = "0.38"
__description__ = """Zippyshare.com Download Hoster"""
- __author_name__ = ("spoob", "zoidberg")
- __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz")
+ __author_name__ = ("spoob", "zoidberg", "stickell")
+ __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it")
__config__ = [("swfdump_path", "string", "Path to swfdump", "")]
FILE_NAME_PATTERN = r'>Name:</font>\s*<font [^>]*>(?P<N>[^<]+)</font><br />'
@@ -62,7 +62,12 @@ class ZippyshareCom(SimpleHoster):
found = re.search(self.DOWNLOAD_URL_PATTERN, self.html, re.S)
if found:
#Method #1: JS eval
- url = self.js.eval("\n".join(found.groups()))
+ js = "\n".join(found.groups())
+ regex = r"document.getElementById\(\\*'dlbutton\\*'\).omg"
+ omg = re.search(regex + r" = ([^;]+);", js).group(1)
+ js = re.sub(regex + r" = ([^;]+);", '', js)
+ js = re.sub(regex, omg, js)
+ url = self.js.eval(js)
else:
#Method #2: SWF eval
seed_search = re.search(self.SEED_PATTERN, self.html)