summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/plugins/accounts/FilerNet.py63
-rw-r--r--pyload/plugins/accounts/UnrestrictLi.py54
-rw-r--r--pyload/plugins/addons/BypassCaptcha.py4
-rw-r--r--pyload/plugins/addons/CaptchaTrader.py4
-rw-r--r--pyload/plugins/addons/DebridItaliaCom.py5
-rw-r--r--pyload/plugins/addons/DeleteFinished.py61
-rw-r--r--pyload/plugins/addons/ExtractArchive.py4
-rw-r--r--pyload/plugins/addons/ImageTyperz.py4
-rw-r--r--pyload/plugins/addons/LinkdecrypterCom.py4
-rw-r--r--pyload/plugins/addons/Premium4Me.py12
-rw-r--r--pyload/plugins/addons/RestartFailed.py137
-rw-r--r--pyload/plugins/addons/SkipRev.py46
-rw-r--r--pyload/plugins/addons/UnrestrictLi.py44
-rw-r--r--pyload/plugins/addons/XFileSharingPro.py46
-rw-r--r--pyload/plugins/crypter/BitshareComFolder.py31
-rw-r--r--pyload/plugins/crypter/DdlstorageComFolder.py46
-rw-r--r--pyload/plugins/crypter/NCryptIn.py2
-rwxr-xr-xpyload/plugins/hooks/Captcha9kw.py19
-rw-r--r--pyload/plugins/hoster/CloudzerNet.py17
-rw-r--r--pyload/plugins/hoster/DdlstorageCom.py17
-rw-r--r--pyload/plugins/hoster/EasybytezCom.py12
-rw-r--r--pyload/plugins/hoster/FilerNet.py30
-rw-r--r--pyload/plugins/hoster/FilezyNet.py33
-rw-r--r--pyload/plugins/hoster/HundredEightyUploadCom.py36
-rw-r--r--pyload/plugins/hoster/LoadTo.py64
-rw-r--r--pyload/plugins/hoster/MegacrypterCom.py59
-rw-r--r--pyload/plugins/hoster/Premium4Me.py18
-rw-r--r--pyload/plugins/hoster/RapidgatorNet.py42
-rw-r--r--pyload/plugins/hoster/StreamcloudEu.py111
-rw-r--r--pyload/plugins/hoster/TurbobitNet.py4
-rw-r--r--pyload/plugins/hoster/UploadheroCom.py3
-rw-r--r--pyload/plugins/hoster/VeehdCom.py6
-rw-r--r--pyload/plugins/hoster/XFileSharingPro.py19
-rw-r--r--pyload/plugins/hoster/XHamsterCom.py4
-rw-r--r--pyload/plugins/hoster/Xdcc.py8
-rw-r--r--pyload/plugins/hoster/XvidstageCom.py114
-rw-r--r--pyload/plugins/hoster/YoutubeCom.py10
-rw-r--r--pyload/plugins/hoster/ZippyshareCom.py13
38 files changed, 749 insertions, 457 deletions
diff --git a/pyload/plugins/accounts/FilerNet.py b/pyload/plugins/accounts/FilerNet.py
new file mode 100644
index 000000000..7afd00f25
--- /dev/null
+++ b/pyload/plugins/accounts/FilerNet.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+import re
+import _strptime
+import time
+
+from module.plugins.Account import Account
+from module.utils import parseFileSize
+
+
+class FilerNet(Account):
+ __name__ = "FilerNet"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """Filer.net account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />'
+ WALID_UNTIL_PATTERN = r"Der Premium-Zugang ist gültig bis (.+)\.\s*</td>"
+ TRAFFIC_PATTERN = r'Traffic</th>\s*<td>([^<]+)</td>'
+ FREE_PATTERN = r'Account Status</th>\s*<td>\s*Free'
+
+ def loadAccountInfo(self, user, req):
+ self.html = req.load("https://filer.net/profile")
+
+ # Free user
+ if re.search(self.FREE_PATTERN, self.html):
+ return {"premium": False, "validuntil": None, "trafficleft": None}
+
+ until = re.search(self.WALID_UNTIL_PATTERN, self.html)
+ traffic = re.search(self.TRAFFIC_PATTERN, self.html)
+ if until and traffic:
+ validuntil = int(time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S")))
+ trafficleft = parseFileSize(traffic.group(1)) / 1024
+ return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft}
+ else:
+ self.logError('Unable to retrieve account information - Plugin may be out of date')
+ return {"premium": False, "validuntil": None, "trafficleft": None}
+
+ def login(self, user, data, req):
+ self.html = req.load("https://filer.net/login")
+ token = re.search(self.TOKEN_PATTERN, self.html).group(1)
+ self.html = req.load("https://filer.net/login_check",
+ post={"_username": user, "_password": data["password"],
+ "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"})
+ if 'Logout' not in self.html:
+ self.wrongPassword()
diff --git a/pyload/plugins/accounts/UnrestrictLi.py b/pyload/plugins/accounts/UnrestrictLi.py
new file mode 100644
index 000000000..9ec2ea996
--- /dev/null
+++ b/pyload/plugins/accounts/UnrestrictLi.py
@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+from module.plugins.Account import Account
+from module.common.json_layer import json_loads
+
+
+class UnrestrictLi(Account):
+ __name__ = "UnrestrictLi"
+ __version__ = "0.02"
+ __type__ = "account"
+ __description__ = """Unrestrict.li account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ def loadAccountInfo(self, user, req):
+ json_data = req.load('http://unrestrict.li/api/jdownloader/user.php?format=json')
+ self.logDebug("JSON data: " + json_data)
+ json_data = json_loads(json_data)
+
+ if 'vip' in json_data['result'] and json_data['result']['vip'] == 0:
+ return {"premium": False}
+
+ validuntil = json_data['result']['expires']
+ trafficleft = int(json_data['result']['traffic'] / 1024)
+
+ return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft}
+
+ def login(self, user, data, req):
+ html = req.load("https://unrestrict.li/sign_in")
+
+ if 'solvemedia' in html:
+ self.logError("A Captcha is required. Go to http://unrestrict.li/sign_in and login, then retry")
+ return
+
+ self.html = req.load("https://unrestrict.li/sign_in",
+ post={"username": user, "password": data["password"], "signin": "Sign in"})
+
+ if 'sign_out' not in self.html:
+ self.wrongPassword()
diff --git a/pyload/plugins/addons/BypassCaptcha.py b/pyload/plugins/addons/BypassCaptcha.py
index 24ad17dd8..e24a439af 100644
--- a/pyload/plugins/addons/BypassCaptcha.py
+++ b/pyload/plugins/addons/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/pyload/plugins/addons/CaptchaTrader.py b/pyload/plugins/addons/CaptchaTrader.py
index 889fa38ef..82dd2383a 100644
--- a/pyload/plugins/addons/CaptchaTrader.py
+++ b/pyload/plugins/addons/CaptchaTrader.py
@@ -46,9 +46,9 @@ class CaptchaTraderException(Exception):
class CaptchaTrader(Addon):
__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/pyload/plugins/addons/DebridItaliaCom.py b/pyload/plugins/addons/DebridItaliaCom.py
index 80cdc45f6..99b2dd626 100644
--- a/pyload/plugins/addons/DebridItaliaCom.py
+++ b/pyload/plugins/addons/DebridItaliaCom.py
@@ -20,7 +20,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class DebridItaliaCom(MultiHoster):
__name__ = "DebridItaliaCom"
- __version__ = "0.05"
+ __version__ = "0.06"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
@@ -38,4 +38,5 @@ class DebridItaliaCom(MultiHoster):
"bitshare.com", "share-links.biz", "putlocker.com", "uploaded.to",
"speedload.org", "rapidgator.net", "likeupload.net", "cyberlocker.ch",
"depositfiles.com", "extabit.com", "filefactory.com", "sharefiles.co",
- "ryushare.com", "tusfiles.net", "nowvideo.co", "cloudzer.net", "letitbit.net"]
+ "ryushare.com", "tusfiles.net", "nowvideo.co", "cloudzer.net", "letitbit.net",
+ "easybytez.com"]
diff --git a/pyload/plugins/addons/DeleteFinished.py b/pyload/plugins/addons/DeleteFinished.py
index e0df69eef..01cb1b8e1 100644
--- a/pyload/plugins/addons/DeleteFinished.py
+++ b/pyload/plugins/addons/DeleteFinished.py
@@ -17,13 +17,13 @@
@author: Walter Purcaro
"""
+from module.database import style
from module.plugins.Hook import Hook
-from time import time
class DeleteFinished(Hook):
__name__ = "DeleteFinished"
- __version__ = "0.5"
+ __version__ = "1.02"
__description__ = "Automatically delete finished packages from queue"
__config__ = [
("activated", "bool", "Activated", "False"),
@@ -32,19 +32,44 @@ class DeleteFinished(Hook):
__author_name__ = ("Walter Purcaro")
__author_mail__ = ("vuolter@gmail.com")
- def wakeup(self, pypack):
- # self.logDebug("self.wakeup")
- self.removeEvent("packageFinished", self.wakeup)
- self.info["sleep"] = False
-
+ ## overwritten methods ##
def periodical(self):
# self.logDebug("self.periodical")
if not self.info["sleep"]:
- self.core.api.deleteFinished()
- self.logDebug("called self.core.api.deleteFinished")
+ self.logInfo("self.deleteFinished")
+ self.deleteFinished()
self.info["sleep"] = True
self.addEvent("packageFinished", self.wakeup)
+ def pluginConfigChanged(self, plugin, name, value):
+ # self.logDebug("self.pluginConfigChanged")
+ if name == "interval" and value != self.interval:
+ self.interval = value
+ self.initPeriodical()
+
+ def unload(self):
+ # self.logDebug("self.unload")
+ self.removeEvent("packageFinished", self.wakeup)
+
+ def coreReady(self):
+ # self.logDebug("self.coreReady")
+ self.info = {"sleep": True}
+ interval = self.getConfig("interval") * 3600
+ self.pluginConfigChanged("DeleteFinished", "interval", interval)
+ self.addEvent("packageFinished", self.wakeup)
+
+ ## own methods ##
+ @style.queue
+ def deleteFinished(self):
+ self.c.execute("DELETE FROM packages WHERE NOT EXISTS(SELECT 1 FROM links WHERE package=packages.id AND status NOT IN (0,4))")
+ self.c.execute("DELETE FROM links WHERE NOT EXISTS(SELECT 1 FROM packages WHERE id=links.package)")
+
+ def wakeup(self, pypack):
+ # self.logDebug("self.wakeup")
+ self.removeEvent("packageFinished", self.wakeup)
+ self.info["sleep"] = False
+
+ ## event managing ##
def addEvent(self, event, handler):
if event in self.manager.events:
if handler not in self.manager.events[event]:
@@ -66,21 +91,3 @@ class DeleteFinished(Hook):
else:
# self.logDebug("self.removeEvent: " + event + ": NOT removed handler")
return False
-
- def configEvents(self, plugin=None, name=None, value=None):
- # self.logDebug("self.configEvents")
- interval = self.getConfig("interval") * 3600
- if interval != self.interval:
- self.interval = interval
-
- def unload(self):
- # self.logDebug("self.unload")
- self.removeEvent("pluginConfigChanged", self.configEvents)
- self.removeEvent("packageFinished", self.wakeup)
-
- def coreReady(self):
- # self.logDebug("self.coreReady")
- self.info = {"sleep": True}
- self.addEvent("pluginConfigChanged", self.configEvents)
- self.configEvents()
- self.addEvent("packageFinished", self.wakeup)
diff --git a/pyload/plugins/addons/ExtractArchive.py b/pyload/plugins/addons/ExtractArchive.py
index 369b20ba9..587903fbe 100644
--- a/pyload/plugins/addons/ExtractArchive.py
+++ b/pyload/plugins/addons/ExtractArchive.py
@@ -57,7 +57,7 @@ class ExtractArchive(Addon):
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),
@@ -152,7 +152,7 @@ class ExtractArchive(Addon):
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/pyload/plugins/addons/ImageTyperz.py b/pyload/plugins/addons/ImageTyperz.py
index 59b6334a7..f8f515113 100644
--- a/pyload/plugins/addons/ImageTyperz.py
+++ b/pyload/plugins/addons/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/pyload/plugins/addons/LinkdecrypterCom.py b/pyload/plugins/addons/LinkdecrypterCom.py
index d3d6bce68..c117cafb9 100644
--- a/pyload/plugins/addons/LinkdecrypterCom.py
+++ b/pyload/plugins/addons/LinkdecrypterCom.py
@@ -24,9 +24,9 @@ from module.utils import remove_chars
class LinkdecrypterCom(Hook):
__name__ = "LinkdecrypterCom"
- __version__ = "0.17"
+ __version__ = "0.18"
__description__ = """linkdecrypter.com - regexp loader"""
- __config__ = [ ("activated", "bool", "Activated" , "True") ]
+ __config__ = [ ("activated", "bool", "Activated" , "False") ]
__author_name__ = ("zoidberg")
def coreReady(self):
diff --git a/pyload/plugins/addons/Premium4Me.py b/pyload/plugins/addons/Premium4Me.py
index b4e4f822f..edbdfbdb9 100644
--- a/pyload/plugins/addons/Premium4Me.py
+++ b/pyload/plugins/addons/Premium4Me.py
@@ -5,19 +5,19 @@ from module.plugins.internal.MultiHoster import MultiHoster
class Premium4Me(MultiHoster):
__name__ = "Premium4Me"
- __version__ = "0.02"
+ __version__ = "0.03"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"),
("hosterList", "str", "Hoster list (comma separated)", "")]
- __description__ = """premium4.me hook plugin"""
- __author_name__ = ("RaNaN", "zoidberg")
- __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz")
+ __description__ = """Premium.to hook plugin"""
+ __author_name__ = ("RaNaN", "zoidberg", "stickell")
+ __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it")
def getHoster(self):
- page = getURL("http://premium4.me/api/hosters.php?authcode=%s" % self.account.authcode)
+ page = getURL("http://premium.to/api/hosters.php?authcode=%s" % self.account.authcode)
return [x.strip() for x in page.replace("\"", "").split(";")]
def coreReady(self):
@@ -27,7 +27,7 @@ class Premium4Me(MultiHoster):
user = self.account.selectAccount()[0]
if not user:
- self.logError(_("Please add your premium4.me account first and restart pyLoad"))
+ self.logError(_("Please add your premium.to account first and restart pyLoad"))
return
return MultiHoster.coreReady(self) \ No newline at end of file
diff --git a/pyload/plugins/addons/RestartFailed.py b/pyload/plugins/addons/RestartFailed.py
index 7ee53deb9..c78ccf96c 100644
--- a/pyload/plugins/addons/RestartFailed.py
+++ b/pyload/plugins/addons/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.52"
+ __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/pyload/plugins/addons/SkipRev.py b/pyload/plugins/addons/SkipRev.py
new file mode 100644
index 000000000..561329122
--- /dev/null
+++ b/pyload/plugins/addons/SkipRev.py
@@ -0,0 +1,46 @@
+ # -*- 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
+"""
+
+from module.plugins.Hook import Hook
+from os.path import basename
+from re import search
+
+
+class SkipRev(Hook):
+ __name__ = "SkipRev"
+ __version__ = "0.07"
+ __description__ = "Skip download when filename has rev extension"
+ __config__ = [
+ ("activated", "bool", "Activated", "False"),
+ ("number", "int", "Do not skip until rev part", "1")
+ ]
+ __author_name__ = ("Walter Purcaro")
+ __author_mail__ = ("vuolter@gmail.com")
+
+ def downloadPreparing(self, pyfile):
+ # self.logDebug("self.downloadPreparing")
+ name = basename(pyfile.name)
+ if not name.endswith(".rev"):
+ return
+ number = self.getConfig("number")
+ part = search(r'\.part(\d+)\.rev$', name)
+ if not part or int(part.group(1)) <= number:
+ return
+ self.logInfo("Skipping " + name)
+ pyfile.setStatus("skipped")
diff --git a/pyload/plugins/addons/UnrestrictLi.py b/pyload/plugins/addons/UnrestrictLi.py
new file mode 100644
index 000000000..0810a22d5
--- /dev/null
+++ b/pyload/plugins/addons/UnrestrictLi.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+from module.plugins.internal.MultiHoster import MultiHoster
+from module.network.RequestFactory import getURL
+from module.common.json_layer import json_loads
+
+
+class UnrestrictLi(MultiHoster):
+ __name__ = "UnrestrictLi"
+ __version__ = "0.02"
+ __type__ = "hook"
+ __config__ = [("activated", "bool", "Activated", "False"),
+ ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
+ ("hosterList", "str", "Hoster list (comma separated)", ""),
+ ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
+ ("interval", "int", "Reload interval in hours (0 to disable)", "24"),
+ ("history", "bool", "Delete History", "False")]
+
+ __description__ = """Unrestrict.li hook plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ def getHoster(self):
+ json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json')
+ json_data = json_loads(json_data)
+
+ host_list = [element['host'] for element in json_data['result']]
+
+ return host_list
diff --git a/pyload/plugins/addons/XFileSharingPro.py b/pyload/plugins/addons/XFileSharingPro.py
index 105c70113..f14ba7eb7 100644
--- a/pyload/plugins/addons/XFileSharingPro.py
+++ b/pyload/plugins/addons/XFileSharingPro.py
@@ -5,7 +5,7 @@ import re
class XFileSharingPro(Hook):
__name__ = "XFileSharingPro"
- __version__ = "0.04"
+ __version__ = "0.05"
__type__ = "hook"
__config__ = [ ("activated" , "bool" , "Activated" , "True"),
("loadDefault", "bool", "Include default (built-in) hoster list" , "True"),
@@ -14,57 +14,57 @@ class XFileSharingPro(Hook):
__description__ = """Hoster URL pattern loader for the generic XFileSharingPro plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
def coreReady(self):
self.loadPattern()
-
- def loadPattern(self):
+
+ def loadPattern(self):
hosterList = self.getConfigSet('includeList')
- excludeList = self.getConfigSet('excludeList')
-
- if self.getConfig('loadDefault'):
+ excludeList = self.getConfigSet('excludeList')
+
+ if self.getConfig('loadDefault'):
hosterList |= set((
#WORKING HOSTERS:
"aieshare.com", "asixfiles.com", "banashare.com", "cyberlocker.ch", "eyesfile.co", "eyesfile.com",
- "fileband.com", "filedwon.com", "filedownloads.org", "hipfile.com", "kingsupload.com", "mlfat4arab.com",
- "netuploaded.com", "odsiebie.pl", "q4share.com", "ravishare.com", "uptobox.com", "verzend.be",
- #NOT TESTED:
- "bebasupload.com", "boosterking.com", "divxme.com", "filevelocity.com", "glumbouploads.com", "grupload.com", "heftyfile.com",
+ "fileband.com", "filedwon.com", "filedownloads.org", "hipfile.com", "kingsupload.com", "mlfat4arab.com",
+ "netuploaded.com", "odsiebie.pl", "q4share.com", "ravishare.com", "uptobox.com", "verzend.be", "xvidstage.com",
+ #NOT TESTED:
+ "bebasupload.com", "boosterking.com", "divxme.com", "filevelocity.com", "glumbouploads.com", "grupload.com", "heftyfile.com",
"host4desi.com", "laoupload.com", "linkzhost.com", "movreel.com", "rockdizfile.com", "limfile.com"
- "share76.com", "sharebeast.com", "sharehut.com", "sharerun.com", "shareswift.com", "sharingonline.com", "6ybh-upload.com",
- "skipfile.com", "spaadyshare.com", "space4file.com", "uploadbaz.com", "uploadc.com",
- "uploaddot.com", "uploadfloor.com", "uploadic.com", "uploadville.com", "vidbull.com", "zalaa.com",
+ "share76.com", "sharebeast.com", "sharehut.com", "sharerun.com", "shareswift.com", "sharingonline.com", "6ybh-upload.com",
+ "skipfile.com", "spaadyshare.com", "space4file.com", "uploadbaz.com", "uploadc.com",
+ "uploaddot.com", "uploadfloor.com", "uploadic.com", "uploadville.com", "vidbull.com", "zalaa.com",
"zomgupload.com", "kupload.org", "movbay.org", "multishare.org", "omegave.org", "toucansharing.org", "uflinq.org",
"banicrazy.info", "flowhot.info", "upbrasil.info", "shareyourfilez.biz", "bzlink.us", "cloudcache.cc", "fileserver.cc"
"farshare.to", "filemaze.ws", "filehost.ws", "filestock.ru", "moidisk.ru", "4up.im", "100shared.com",
#WRONG FILE NAME:
- "sendmyway.com", "upchi.co.il", "180upload.com",
+ "sendmyway.com", "upchi.co.il",
#NOT WORKING:
"amonshare.com", "imageporter.com", "file4safe.com",
#DOWN OR BROKEN:
"ddlanime.com", "fileforth.com", "loombo.com", "goldfile.eu", "putshare.com"
- ))
-
+ ))
+
hosterList -= (excludeList)
hosterList -= set(('', u''))
-
+
if not hosterList:
self.unload()
return
-
+
regexp = r"http://(?:[^/]*\.)?(%s)/\w{12}" % ("|".join(sorted(hosterList)).replace('.','\.'))
#self.logDebug(regexp)
-
+
dict = self.core.pluginManager.hosterPlugins['XFileSharingPro']
dict["pattern"] = regexp
dict["re"] = re.compile(regexp)
self.logDebug("Pattern loaded - handling %d hosters" % len(hosterList))
-
+
def getConfigSet(self, option):
s = self.getConfig(option).lower().replace('|',',').replace(';',',')
return set([x.strip() for x in s.split(',')])
-
+
def unload(self):
dict = self.core.pluginManager.hosterPlugins['XFileSharingPro']
dict["pattern"] = r"^unmatchable$"
- dict["re"] = re.compile(r"^unmatchable$") \ No newline at end of file
+ dict["re"] = re.compile(r"^unmatchable$")
diff --git a/pyload/plugins/crypter/BitshareComFolder.py b/pyload/plugins/crypter/BitshareComFolder.py
new file mode 100644
index 000000000..b77ddb9d9
--- /dev/null
+++ b/pyload/plugins/crypter/BitshareComFolder.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+from module.plugins.internal.SimpleCrypter import SimpleCrypter
+
+
+class BitshareComFolder(SimpleCrypter):
+ __name__ = "BitshareComFolder"
+ __type__ = "crypter"
+ __pattern__ = r"http://(?:www\.)?bitshare\.com/\?d=\w+"
+ __version__ = "0.01"
+ __description__ = """Bitshare.com Folder Plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ LINK_PATTERN = r'<a href="(http://bitshare.com/files/.+)">.+</a></td>'
+ TITLE_PATTERN = r'View public folder "(?P<title>.+)"</h1>'
diff --git a/pyload/plugins/crypter/DdlstorageComFolder.py b/pyload/plugins/crypter/DdlstorageComFolder.py
index d536032c6..d76988c92 100644
--- a/pyload/plugins/crypter/DdlstorageComFolder.py
+++ b/pyload/plugins/crypter/DdlstorageComFolder.py
@@ -1,32 +1,30 @@
# -*- coding: utf-8 -*-
-import re
-from module.plugins.Crypter import Crypter
-from module.plugins.hoster.MediafireCom import checkHTMLHeader
-from module.common.json_layer import json_loads
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
-class DdlstorageComFolder(Crypter):
+from module.plugins.internal.SimpleCrypter import SimpleCrypter
+
+
+class DdlstorageComFolder(SimpleCrypter):
__name__ = "DdlstorageComFolder"
__type__ = "crypter"
__pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/folder/\w{10}"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """DDLStorage.com Folder Plugin"""
- __author_name__ = ("godofdream")
- __author_mail__ = ("soilfiction@gmail.com")
-
- FILE_URL_PATTERN = '<a style="text-decoration:none;" href="http://www.ddlstorage.com/(.*)">'
+ __author_name__ = ("godofdream", "stickell")
+ __author_mail__ = ("soilfiction@gmail.com", "l.stickell@yahoo.it")
- def decrypt(self, pyfile):
- new_links = []
- # load and parse html
- html = self.load(pyfile.url)
- found = re.findall(self.FILE_URL_PATTERN, html)
- self.logDebug(found)
- for link in found:
- # file page
- new_links.append("http://www.ddlstorage.com/%s" % link)
-
- if new_links:
- self.core.files.addLinks(new_links, self.pyfile.package().id)
- else:
- self.fail('Could not extract any links')
+ LINK_PATTERN = '<a class="sub_title" style="text-decoration:none;" href="(http://www.ddlstorage.com/.*)">'
diff --git a/pyload/plugins/crypter/NCryptIn.py b/pyload/plugins/crypter/NCryptIn.py
index bcb563fc6..821636821 100644
--- a/pyload/plugins/crypter/NCryptIn.py
+++ b/pyload/plugins/crypter/NCryptIn.py
@@ -11,7 +11,7 @@ class NCryptIn(Crypter):
__name__ = "NCryptIn"
__type__ = "crypter"
__pattern__ = r"http://(?:www\.)?ncrypt.in/folder-([^/\?]+)"
- __version__ = "1.21"
+ __version__ = "1.22"
__description__ = """NCrypt.in Crypter Plugin"""
__author_name__ = ("fragonib")
__author_mail__ = ("fragonib[AT]yahoo[DOT]es")
diff --git a/pyload/plugins/hooks/Captcha9kw.py b/pyload/plugins/hooks/Captcha9kw.py
index b80c06662..2eb780468 100755
--- a/pyload/plugins/hooks/Captcha9kw.py
+++ b/pyload/plugins/hooks/Captcha9kw.py
@@ -30,14 +30,15 @@ from module.plugins.Hook import Hook
class Captcha9kw(Hook):
__name__ = "Captcha9kw"
- __version__ = "0.04"
+ __version__ = "0.06"
__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"),
- ("captchaperhour", "int", "Captcha per hour", "9999"),
- ("prio", "int", "Prio (1-10)", "0"),
+ ("confirm", "bool", "Confirm Captcha (Cost +6)", "False"),
+ ("captchaperhour", "int", "Captcha per hour (max. 9999)", "9999"),
+ ("prio", "int", "Prio 1-10 (Cost +1-10)", "0"),
+ ("timeout", "int", "Timeout (max. 300)", "220"),
("passkey", "password", "API key", ""),]
__author_name__ = ("RaNaN")
__author_mail__ = ("RaNaN@pyload.org")
@@ -76,7 +77,7 @@ class Captcha9kw(Hook):
"prio": self.getConfig("prio"),
"confirm": self.getConfig("confirm"),
"captchaperhour": self.getConfig("captchaperhour"),
- "maxtimeout": "220",
+ "maxtimeout": self.getConfig("timeout"),
"pyload": "1",
"source": "pyload",
"base64": "1",
@@ -87,13 +88,13 @@ class Captcha9kw(Hook):
if response.isdigit():
self.logInfo(_("NewCaptchaID from upload: %s : %s" % (response,task.captchaFile)))
- for i in range(1, 220, 1):
+ for i in range(1, 100, 1):
response2 = getURL(self.API_URL, get = { "apikey": self.getConfig("passkey"), "id": response,"pyload": "1","source": "pyload", "action": "usercaptchacorrectdata" })
if(response2 != ""):
break;
- time.sleep(1)
+ time.sleep(3)
result = response2
task.data["ticket"] = response
@@ -115,7 +116,7 @@ class Captcha9kw(Hook):
if self.getCredits() > 0:
task.handler.append(self)
- task.setWaiting(220)
+ task.setWaiting(self.getConfig("timeout"))
start_new_thread(self.processCaptcha, (task,))
else:
diff --git a/pyload/plugins/hoster/CloudzerNet.py b/pyload/plugins/hoster/CloudzerNet.py
index 7608b193d..2701752ce 100644
--- a/pyload/plugins/hoster/CloudzerNet.py
+++ b/pyload/plugins/hoster/CloudzerNet.py
@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
+from module.plugins.internal.SimpleHoster import SimpleHoster
from module.common.json_layer import json_loads
from module.plugins.ReCaptcha import ReCaptcha
from module.network.RequestFactory import getURL
+from module.utils import parseFileSize
def getInfo(urls):
@@ -12,7 +13,13 @@ def getInfo(urls):
if 'Location: http://cloudzer.net/404' in header:
file_info = (url, 0, 1, url)
else:
- file_info = parseFileInfo(CloudzerNet, url, getURL(url, decode=True))
+ if url.endswith('/'):
+ api_data = getURL(url + 'status')
+ else:
+ api_data = getURL(url + '/status')
+ name, size = api_data.splitlines()
+ size = parseFileSize(size)
+ file_info = (name, size, 2, url)
yield file_info
@@ -20,10 +27,10 @@ class CloudzerNet(SimpleHoster):
__name__ = "CloudzerNet"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)(?P<ID>\w+).*"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Cloudzer.net hoster plugin"""
- __author_name__ = ("gs", "z00nx")
- __author_mail__ = ("I-_-I-_-I@web.de", "z00nx0@gmail.com")
+ __author_name__ = ("gs", "z00nx", "stickell")
+ __author_mail__ = ("I-_-I-_-I@web.de", "z00nx0@gmail.com", "l.stickell@yahoo.it")
FILE_SIZE_PATTERN = '<span class="size">(?P<S>[^<]+)</span>'
WAIT_PATTERN = '<meta name="wait" content="(\d+)">'
diff --git a/pyload/plugins/hoster/DdlstorageCom.py b/pyload/plugins/hoster/DdlstorageCom.py
index 1ad5fa6d8..5eaebf1d1 100644
--- a/pyload/plugins/hoster/DdlstorageCom.py
+++ b/pyload/plugins/hoster/DdlstorageCom.py
@@ -1,20 +1,19 @@
# -*- coding: utf-8 -*-
+
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+
class DdlstorageCom(XFileSharingPro):
__name__ = "DdlstorageCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/\w{12}"
- __version__ = "0.06"
+ __version__ = "0.07"
__description__ = """DDLStorage.com hoster plugin"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
-
- FILE_INFO_PATTERN = r'<h2>\s*Download File\s*<span[^>]*>(?P<N>[^>]+)</span></h2>\s*[^\(]*\((?P<S>[^\)]+)\)</h2>'
+ __author_name__ = ("zoidberg", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
+
+ FILE_INFO_PATTERN = r'<p class="sub_title"[^>]*>(?P<N>.+) \((?P<S>[^)]+)\)</p>'
HOSTER_NAME = "ddlstorage.com"
-
- def setup(self):
- self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
+
getInfo = create_getInfo(DdlstorageCom) \ No newline at end of file
diff --git a/pyload/plugins/hoster/EasybytezCom.py b/pyload/plugins/hoster/EasybytezCom.py
index 96e3d93d2..98691a641 100644
--- a/pyload/plugins/hoster/EasybytezCom.py
+++ b/pyload/plugins/hoster/EasybytezCom.py
@@ -23,17 +23,15 @@ class EasybytezCom(XFileSharingPro):
__name__ = "EasybytezCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*"
- __version__ = "0.14"
+ __version__ = "0.17"
__description__ = """easybytez.com"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
+ __author_name__ = ("zoidberg", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
- FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"'
- FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>'
- FILE_INFO_PATTERN = r'<tr><td align=right><b>Filename:</b></td><td nowrap>(?P<N>[^<]+)</td></tr>\s*.*?<small>\((?P<S>[^<]+)\)</small>'
+ FILE_INFO_PATTERN = r'<span class="name">(?P<N>.+)</span><br>\s*<span class="size">(?P<S>[^<]+)</span>'
FILE_OFFLINE_PATTERN = r'<h1>File not available</h1>'
- DIRECT_LINK_PATTERN = r'(http://(\w+\.(easybytez|zingload)\.com|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)'
+ DIRECT_LINK_PATTERN = r'(http://(\w+\.(easyload|easybytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)'
OVR_DOWNLOAD_LINK_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)'
OVR_KILL_LINK_PATTERN = r'<h2>Delete Link</h2>\s*<textarea[^>]*>([^<]+)'
ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|<Center><b>)(.*?)</'
diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py
index 9693723f9..815685ef8 100644
--- a/pyload/plugins/hoster/FilerNet.py
+++ b/pyload/plugins/hoster/FilerNet.py
@@ -30,7 +30,7 @@ class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
__pattern__ = r"https?://(www\.)?filer\.net/get/(\w+)"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Filer.net Download Hoster"""
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
@@ -38,10 +38,17 @@ class FilerNet(SimpleHoster):
FILE_INFO_PATTERN = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>\w+)</small></h1>'
FILE_OFFLINE_PATTERN = r'Nicht gefunden'
RECAPTCHA_KEY = '6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V'
+ DIRECT_LINK_PATTERN = r'href="([^"]+)">Get download</a>'
def process(self, pyfile):
+ if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()):
+ self.handlePremium()
+ else:
+ self.handleFree()
+
+ def handleFree(self):
self.req.setOption("timeout", 120)
- self.html = self.load(pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES)
+ self.html = self.load(self.pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES)
# Wait between downloads
m = re.search(r'musst du <span id="time">(\d+)</span> Sekunden warten', self.html)
@@ -50,12 +57,7 @@ class FilerNet(SimpleHoster):
self.retry(3, waittime, 'Wait between free downloads')
self.getFileInfo()
- if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()):
- self.handlePremium()
- else:
- self.handleFree()
- def handleFree(self):
self.html = self.load(self.pyfile.url, decode=True)
inputs = self.parseHtmlForm(input_names='token')[1]
@@ -99,5 +101,19 @@ class FilerNet(SimpleHoster):
self.download(downloadURL, disposition=True)
+ def handlePremium(self):
+ header = self.load(self.pyfile.url, just_header=True)
+ if 'location' in header: # Direct Download ON
+ dl = self.pyfile.url
+ else: # Direct Download OFF
+ html = self.load(self.pyfile.url)
+ m = re.search(self.DIRECT_LINK_PATTERN, html)
+ if not m:
+ self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings")
+ dl = 'http://filer.net' + m.group(1)
+
+ self.logDebug('Direct link: ' + dl)
+ self.download(dl, disposition=True)
+
getInfo = create_getInfo(FilerNet)
diff --git a/pyload/plugins/hoster/FilezyNet.py b/pyload/plugins/hoster/FilezyNet.py
new file mode 100644
index 000000000..7c5729c2d
--- /dev/null
+++ b/pyload/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/pyload/plugins/hoster/HundredEightyUploadCom.py b/pyload/plugins/hoster/HundredEightyUploadCom.py
new file mode 100644
index 000000000..d8b744359
--- /dev/null
+++ b/pyload/plugins/hoster/HundredEightyUploadCom.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero 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 Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+
+
+class HundredEightyUploadCom(XFileSharingPro):
+ __name__ = "HundredEightyUploadCom"
+ __type__ = "hoster"
+ __pattern__ = r"http://(?:\w*\.)?180upload\.com/(\w+).*"
+ __version__ = "0.01"
+ __description__ = """180upload.com hoster plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ FILE_NAME_PATTERN = r'Filename:</b></td><td nowrap>(?P<N>.+)</td></tr>-->'
+ FILE_SIZE_PATTERN = r'Size:</b></td><td>(?P<S>[\d.]+) (?P<U>[A-Z]+)\s*<small>'
+
+ HOSTER_NAME = "180upload.com"
+
+
+getInfo = create_getInfo(HundredEightyUploadCom)
diff --git a/pyload/plugins/hoster/LoadTo.py b/pyload/plugins/hoster/LoadTo.py
index babf354a9..0f99c272a 100644
--- a/pyload/plugins/hoster/LoadTo.py
+++ b/pyload/plugins/hoster/LoadTo.py
@@ -16,41 +16,25 @@
@author: halfman
"""
+# Test links (random.bin):
+# http://www.load.to/dNsmgXRk4/random.bin
+# http://www.load.to/edbNTxcUb/random100.bin
+
import re
-from module.plugins.Hoster import Hoster
-from module.network.RequestFactory import getURL
-
-def getInfo(urls):
- result = []
-
- for url in urls:
-
- html = getURL(url, decode=True)
- if re.search(LoadTo.FILE_OFFLINE_PATTERN, html):
- # File offline
- result.append((url, 0, 1, url))
- else:
- # Get file info
- name = re.search(LoadTo.FILE_NAME_PATTERN, html)
- size = re.search(LoadTo.SIZE_PATTERN, html)
- if name is not None and size is not None:
- name = name.group(1)
- size = size.group(1)
- result.append((name, size, 2, url))
- yield result
-
-class LoadTo(Hoster):
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class LoadTo(SimpleHoster):
__name__ = "LoadTo"
__type__ = "hoster"
- __pattern__ = r"http://(www.*?\.)?load\.to/.{7,10}?/.*"
- __version__ = "0.11"
- __description__ = """load.to"""
- __author_name__ = ("halfman")
- __author_mail__ = ("Pulpan3@gmail.com")
+ __pattern__ = r"http://(?:www\.)?load\.to/\w+"
+ __version__ = "0.12"
+ __description__ = """Load.to hoster plugin"""
+ __author_name__ = ("halfman", "stickell")
+ __author_mail__ = ("Pulpan3@gmail.com", "l.stickell@yahoo.it")
- FILE_NAME_PATTERN = r'<div class="toolarge"><h1>(.+?)</h1></div>'
+ FILE_INFO_PATTERN = r'<a [^>]+>(?P<N>.+)</a></h3>\s*Size: (?P<S>\d+) Bytes'
URL_PATTERN = r'<form method="post" action="(.+?)"'
- SIZE_PATTERN = r'<div class="download_table_right">(\d+) Bytes</div>'
FILE_OFFLINE_PATTERN = r'Can\'t find file. Please check URL.<br />'
WAIT_PATTERN = r'type="submit" value="Download \((\d+)\)"'
@@ -61,23 +45,17 @@ class LoadTo(Hoster):
self.html = self.load(pyfile.url, decode=True)
- if re.search(self.FILE_OFFLINE_PATTERN, self.html):
- self.offline()
-
- found = re.search(self.FILE_NAME_PATTERN, self.html)
- if found is None:
- self.fail("Parse error (NAME)")
- pyfile.name = found.group(1)
-
found = re.search(self.URL_PATTERN, self.html)
- if found is None:
- self.fail("Parse error (URL)")
+ if not found:
+ self.parseError('URL')
download_url = found.group(1)
-
+
timmy = re.search(self.WAIT_PATTERN, self.html)
if timmy:
self.setWait(timmy.group(1))
self.wait()
- self.req.setOption("timeout", 120)
- self.download(download_url) \ No newline at end of file
+ self.download(download_url, disposition=True)
+
+
+getInfo = create_getInfo(LoadTo)
diff --git a/pyload/plugins/hoster/MegacrypterCom.py b/pyload/plugins/hoster/MegacrypterCom.py
new file mode 100644
index 000000000..9f012e5be
--- /dev/null
+++ b/pyload/plugins/hoster/MegacrypterCom.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+import re
+
+from module.common.json_layer import json
+from module.plugins.hoster.MegaNz import MegaNz
+
+
+class MegacrypterCom(MegaNz):
+ __name__ = "MegacrypterCom"
+ __type__ = "hoster"
+ __pattern__ = r"(https?://[a-z0-9]{0,10}\.?megacrypter\.com/[a-zA-Z0-9!_\-]+)"
+ __version__ = "0.1"
+ __description__ = """megacrypter plugin, based and inherits from RaNaN's MegaNz plugin"""
+ __author_name__ = ("GonzaloSR", )
+ __author_mail__ = ("gonzalo@gonzalosr.com", )
+
+ API_URL = "http://megacrypter.com/api"
+ FILE_SUFFIX = ".crypted"
+
+
+ def callApi(self, **kwargs):
+ """ Dispatch a call to the api, see megacrypter.com/api_doc """
+ self.logDebug("JSON request: " + json.dumps(kwargs))
+ resp = self.load(self.API_URL, post=json.dumps(kwargs))
+ self.logDebug("API Response: " + resp)
+ return json.loads(resp)
+
+
+ def process(self, pyfile):
+
+ key = None
+
+ # match is guaranteed because plugin was chosen to handle url
+ node = re.search(self.__pattern__, pyfile.url).group(1)
+
+
+ # get Mega.co.nz link info
+ info = self.callApi(link=node, m="info")
+
+ # get crypted file URL
+ dl = self.callApi(link=node, m="dl")
+
+
+ # TODO: map error codes, implement password protection
+ # if info["pass"] == true:
+ # crypted_file_key, md5_file_key = info["key"].split("#")
+
+
+ key = self.b64_decode(info["key"])
+
+ pyfile.name = info["name"] + self.FILE_SUFFIX
+
+ self.download(dl["url"])
+ self.decryptFile(key)
+
+ # Everything is finished and final name can be set
+ pyfile.name = info["name"]
+
+
diff --git a/pyload/plugins/hoster/Premium4Me.py b/pyload/plugins/hoster/Premium4Me.py
index c93084d5d..502e9ff12 100644
--- a/pyload/plugins/hoster/Premium4Me.py
+++ b/pyload/plugins/hoster/Premium4Me.py
@@ -11,11 +11,11 @@ from module.utils import fs_encode
class Premium4Me(Hoster):
__name__ = "Premium4Me"
- __version__ = "0.05"
+ __version__ = "0.07"
__type__ = "hoster"
- __pattern__ = r"http://premium4.me/.*"
- __description__ = """premium4.me hoster plugin"""
+ __pattern__ = r"http://premium.to/.*"
+ __description__ = """Premium.to hoster plugin"""
__author_name__ = ("RaNaN", "zoidberg", "stickell")
__author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it")
@@ -25,10 +25,10 @@ class Premium4Me(Hoster):
def process(self, pyfile):
if not self.account:
- self.logError(_("Please enter your premium4.me account or deactivate this plugin"))
- self.fail("No premium4.me account provided")
+ self.logError(_("Please enter your premium.to account or deactivate this plugin"))
+ self.fail("No premium.to account provided")
- self.logDebug("premium4.me: Old URL: %s" % pyfile.url)
+ self.logDebug("premium.to: Old URL: %s" % pyfile.url)
tra = self.getTraffic()
@@ -36,13 +36,13 @@ class Premium4Me(Hoster):
self.req.setOption("timeout", 120)
self.download(
- "http://premium4.me/api/getfile.php?authcode=%s&link=%s" % (self.account.authcode, quote(pyfile.url, "")),
+ "http://premium.to/api/getfile.php?authcode=%s&link=%s" % (self.account.authcode, quote(pyfile.url, "")),
disposition=True)
check = self.checkDownload({"nopremium": "No premium account available"})
if check == "nopremium":
- self.retry(3, 60, 'No premium account available')
+ self.retry(60, 300, 'No premium account available')
err = ''
if self.req.http.code == '420':
@@ -64,7 +64,7 @@ class Premium4Me(Hoster):
def getTraffic(self):
try:
- traffic = int(self.load("http://premium4.me/api/traffic.php?authcode=%s" % self.account.authcode))
+ traffic = int(self.load("http://premium.to/api/traffic.php?authcode=%s" % self.account.authcode))
except:
traffic = 0
return traffic
diff --git a/pyload/plugins/hoster/RapidgatorNet.py b/pyload/plugins/hoster/RapidgatorNet.py
index d2ca77e0f..3c4611446 100644
--- a/pyload/plugins/hoster/RapidgatorNet.py
+++ b/pyload/plugins/hoster/RapidgatorNet.py
@@ -18,18 +18,18 @@
import re
from pycurl import HTTPHEADER
-from random import random
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.plugins.internal.CaptchaService import ReCaptcha, SolveMedia, AdsCaptcha
from module.common.json_layer import json_loads
from module.network.HTTPRequest import BadHeader
+
class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
__pattern__ = r"http://(?:www\.)?(rapidgator.net)/file/(\w+)"
- __version__ = "0.17"
+ __version__ = "0.18"
__description__ = """rapidgator.net"""
__author_name__ = ("zoidberg", "chrox", "stickell")
@@ -39,32 +39,32 @@ class RapidgatorNet(SimpleHoster):
FILE_OFFLINE_PATTERN = r'<title>File not found</title>'
JSVARS_PATTERN = r"\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*'?(.*?)'?;"
- DOWNLOAD_LINK_PATTERN = r"return '(http[^']+)';\s*}\s*}\s*}\);"
+ DOWNLOAD_LINK_PATTERN = r"return '(http[^']+)';\s*}\s*}\s*}?\);"
RECAPTCHA_KEY_PATTERN = r'"http://api.recaptcha.net/challenge?k=(.*?)"'
ADSCAPTCHA_SRC_PATTERN = r'(http://api.adscaptcha.com/Get.aspx[^"\']*)'
SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
-
+
def setup(self):
self.resumeDownload = False
self.multiDL = False
self.sid = None
self.chunkLimit = 1
self.req.setOption("timeout", 120)
-
+
def process(self, pyfile):
- if self.account:
- self.sid = self.account.getAccountData(self.user).get('SID', None)
-
+ if self.account:
+ self.sid = self.account.getAccountData(self.user).get('SID', None)
+
if self.sid:
self.handlePremium()
else:
- self.handleFree()
+ self.handleFree()
def getAPIResponse(self, cmd):
try:
json = self.load('%s/%s' % (self.API_URL, cmd),
- get = {'sid': self.sid,
- 'url': self.pyfile.url}, decode = True)
+ get={'sid': self.sid,
+ 'url': self.pyfile.url}, decode=True)
self.logDebug('API:%s' % cmd, json, "SID: %s" % self.sid)
json = json_loads(json)
status = json['response_status']
@@ -94,11 +94,11 @@ class RapidgatorNet(SimpleHoster):
self.download(url)
def handleFree(self):
- self.html = self.load(self.pyfile.url, decode = True)
+ self.html = self.load(self.pyfile.url, decode=True)
self.getFileInfo()
-
+
if "You can download files up to 500 MB in free mode" in self.html \
- or "This file can be downloaded by premium only" in self.html:
+ or "This file can be downloaded by premium only" in self.html:
self.fail("Premium account needed for download")
self.checkWait()
@@ -109,13 +109,15 @@ class RapidgatorNet(SimpleHoster):
self.req.http.lastURL = self.pyfile.url
self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
- url = "http://rapidgator.net%s?fid=%s" % (jsvars.get('startTimerUrl', '/download/AjaxStartTimer'), jsvars["fid"])
+ url = "http://rapidgator.net%s?fid=%s" % (
+ jsvars.get('startTimerUrl', '/download/AjaxStartTimer'), jsvars["fid"])
jsvars.update(self.getJsonResponse(url))
self.setWait(int(jsvars.get('secs', 30)) + 1, False)
self.wait()
- url = "http://rapidgator.net%s?sid=%s" % (jsvars.get('getDownloadUrl', '/download/AjaxGetDownload'), jsvars["sid"])
+ url = "http://rapidgator.net%s?sid=%s" % (
+ jsvars.get('getDownloadUrl', '/download/AjaxGetDownload'), jsvars["sid"])
jsvars.update(self.getJsonResponse(url))
self.req.http.lastURL = self.pyfile.url
@@ -167,7 +169,8 @@ class RapidgatorNet(SimpleHoster):
self.download(download_url)
def checkWait(self):
- found = re.search(r"(?:Delay between downloads must be not less than|Try again in)\s*(\d+)\s*(hour|min)", self.html)
+ found = re.search(r"(?:Delay between downloads must be not less than|Try again in)\s*(\d+)\s*(hour|min)",
+ self.html)
if found:
wait_time = int(found.group(1)) * {"hour": 60, "min": 1}[found.group(2)]
else:
@@ -180,13 +183,14 @@ class RapidgatorNet(SimpleHoster):
self.logDebug("Waiting %d minutes" % wait_time)
self.setWait(wait_time * 60, True)
self.wait()
- self.retry(max_tries = 24)
+ self.retry(max_tries=24)
def getJsonResponse(self, url):
- response = self.load(url, decode = True)
+ response = self.load(url, decode=True)
if not response.startswith('{'):
self.retry()
self.logDebug(url, response)
return json_loads(response)
+
getInfo = create_getInfo(RapidgatorNet)
diff --git a/pyload/plugins/hoster/StreamcloudEu.py b/pyload/plugins/hoster/StreamcloudEu.py
new file mode 100644
index 000000000..73c0465f8
--- /dev/null
+++ b/pyload/plugins/hoster/StreamcloudEu.py
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+from module.network.HTTPRequest import HTTPRequest
+from time import sleep
+import re
+
+class StreamcloudEu(XFileSharingPro):
+ __name__ = "StreamcloudEu"
+ __type__ = "hoster"
+ __pattern__ = r"http://(www\.)?streamcloud\.eu/\S+"
+ __version__ = "0.02"
+ __description__ = """Streamcloud.eu hoster plugin"""
+ __author_name__ = ("seoester")
+ __author_mail__ = ("seoester@googlemail.com")
+
+ HOSTER_NAME = "streamcloud.eu"
+ DIRECT_LINK_PATTERN = r'file: "(http://(stor|cdn)\d+\.streamcloud.eu:?\d*/.*/video\.mp4)",'
+
+ def setup(self):
+ super(StreamcloudEu, self).setup()
+ self.multiDL = True
+
+ def getDownloadLink(self):
+ found = re.search(self.DIRECT_LINK_PATTERN, self.html, re.S)
+ if found:
+ return found.group(1)
+
+ for i in range(5):
+ self.logDebug("Getting download link: #%d" % i)
+ data = self.getPostParameters()
+ httpRequest = HTTPRequest(options=self.req.options)
+ httpRequest.cj = self.req.cj
+ sleep(10)
+ self.html = httpRequest.load(self.pyfile.url, post = data, referer=False, cookies=True, decode = True)
+ self.header = httpRequest.header
+
+ found = re.search("Location\s*:\s*(.*)", self.header, re.I)
+ if found:
+ break
+
+ found = re.search(self.DIRECT_LINK_PATTERN, self.html, re.S)
+ if found:
+ break
+
+ else:
+ if self.errmsg and 'captcha' in self.errmsg:
+ self.fail("No valid captcha code entered")
+ else:
+ self.fail("Download link not found")
+
+ return found.group(1)
+
+ def getPostParameters(self):
+ for i in range(3):
+ if not self.errmsg: self.checkErrors()
+
+ if hasattr(self,"FORM_PATTERN"):
+ action, inputs = self.parseHtmlForm(self.FORM_PATTERN)
+ else:
+ action, inputs = self.parseHtmlForm(input_names={"op": re.compile("^download")})
+
+ if not inputs:
+ action, inputs = self.parseHtmlForm('F1')
+ if not inputs:
+ if self.errmsg:
+ self.retry()
+ else:
+ self.parseError("Form not found")
+
+ self.logDebug(self.HOSTER_NAME, inputs)
+
+ if 'op' in inputs and inputs['op'] in ('download1', 'download2', 'download3'):
+ if "password" in inputs:
+ if self.passwords:
+ inputs['password'] = self.passwords.pop(0)
+ else:
+ self.fail("No or invalid passport")
+
+ if not self.premium:
+ found = re.search(self.WAIT_PATTERN, self.html)
+ if found:
+ wait_time = int(found.group(1)) + 1
+ self.setWait(wait_time, False)
+ else:
+ wait_time = 0
+
+ self.captcha = self.handleCaptcha(inputs)
+
+ if wait_time: self.wait()
+
+ self.errmsg = None
+ self.logDebug("getPostParameters {0}".format(i))
+ return inputs
+
+ else:
+ inputs['referer'] = self.pyfile.url
+
+ if self.premium:
+ inputs['method_premium'] = "Premium Download"
+ if 'method_free' in inputs: del inputs['method_free']
+ else:
+ inputs['method_free'] = "Free Download"
+ if 'method_premium' in inputs: del inputs['method_premium']
+
+ self.html = self.load(self.pyfile.url, post = inputs, ref = False)
+ self.errmsg = None
+
+ else: self.parseError('FORM: %s' % (inputs['op'] if 'op' in inputs else 'UNKNOWN'))
+
+
+getInfo = create_getInfo(StreamcloudEu)
diff --git a/pyload/plugins/hoster/TurbobitNet.py b/pyload/plugins/hoster/TurbobitNet.py
index b429d5510..09ce46a31 100644
--- a/pyload/plugins/hoster/TurbobitNet.py
+++ b/pyload/plugins/hoster/TurbobitNet.py
@@ -36,14 +36,14 @@ class TurbobitNet(SimpleHoster):
__name__ = "TurbobitNet"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)?(turbobit.net|unextfiles.com)/(?:download/free/)?(?P<ID>\w+).*"
- __version__ = "0.08"
+ __version__ = "0.09"
__description__ = """Turbobit.net plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
FILE_INFO_PATTERN = r"<span class='file-icon1[^>]*>(?P<N>[^<]+)</span>\s*\((?P<S>[^\)]+)\)\s*</h1>" #long filenames are shortened
FILE_NAME_PATTERN = r'<meta name="keywords" content="\s+(?P<N>[^,]+)' #full name but missing on page2
- FILE_OFFLINE_PATTERN = r'<h2>File Not Found</h2>|html\(\'File was not found'
+ FILE_OFFLINE_PATTERN = r'<h2>File Not Found</h2>|html\(\'File (?:was )?not found'
FILE_URL_REPLACEMENTS = [(r"http://(?:\w*\.)?(turbobit.net|unextfiles.com)/(?:download/free/)?(?P<ID>\w+).*", "http://turbobit.net/\g<ID>.html")]
SH_COOKIES = [("turbobit.net", "user_lang", "en")]
diff --git a/pyload/plugins/hoster/UploadheroCom.py b/pyload/plugins/hoster/UploadheroCom.py
index 502f849af..a2348b9f9 100644
--- a/pyload/plugins/hoster/UploadheroCom.py
+++ b/pyload/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/pyload/plugins/hoster/VeehdCom.py b/pyload/plugins/hoster/VeehdCom.py
index 23048b831..d4422afc3 100644
--- a/pyload/plugins/hoster/VeehdCom.py
+++ b/pyload/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/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py
index 1120a2a8b..2103b0c20 100644
--- a/pyload/plugins/hoster/XFileSharingPro.py
+++ b/pyload/plugins/hoster/XFileSharingPro.py
@@ -23,7 +23,7 @@ from urlparse import urlparse
from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError
from module.plugins.ReCaptcha import ReCaptcha
-from module.plugins.internal.CaptchaService import SolveMedia, AdsCaptcha
+from module.plugins.internal.CaptchaService import SolveMedia
from module.utils import html_unescape
class XFileSharingPro(SimpleHoster):
@@ -35,10 +35,10 @@ class XFileSharingPro(SimpleHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
__pattern__ = r"^unmatchable$"
- __version__ = "0.17"
+ __version__ = "0.18"
__description__ = """XFileSharingPro common hoster base"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
+ __author_name__ = ("zoidberg", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"'
FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>'
@@ -151,7 +151,8 @@ class XFileSharingPro(SimpleHoster):
def handlePremium(self):
self.html = self.load(self.pyfile.url, post = self.getPostParameters())
found = re.search(self.DIRECT_LINK_PATTERN, self.html)
- if not found: self.parseError('DIRECT LINK')
+ if not found:
+ self.parseError('DIRECT LINK')
self.startDownload(found.group(1))
def handleOverriden(self):
@@ -183,13 +184,17 @@ class XFileSharingPro(SimpleHoster):
found = re.search(self.OVR_DOWNLOAD_LINK_PATTERN, self.html)
if not found: self.parseError('DIRECT LINK (OVR)')
self.pyfile.url = found.group(1)
- self.retry()
+ header = self.load(self.pyfile.url, just_header=True)
+ if 'location' in header: # Direct link
+ self.startDownload(self.pyfile.url)
+ else:
+ self.retry()
def startDownload(self, link):
link = link.strip()
if self.captcha: self.correctCaptcha()
self.logDebug('DIRECT LINK: %s' % link)
- self.download(link)
+ self.download(link, disposition=True)
def checkErrors(self):
found = re.search(self.ERROR_PATTERN, self.html)
diff --git a/pyload/plugins/hoster/XHamsterCom.py b/pyload/plugins/hoster/XHamsterCom.py
index 0779a78e6..866c5da45 100644
--- a/pyload/plugins/hoster/XHamsterCom.py
+++ b/pyload/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/pyload/plugins/hoster/Xdcc.py b/pyload/plugins/hoster/Xdcc.py
index 4870b8ab9..723623f52 100644
--- a/pyload/plugins/hoster/Xdcc.py
+++ b/pyload/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/pyload/plugins/hoster/XvidstageCom.py b/pyload/plugins/hoster/XvidstageCom.py
deleted file mode 100644
index 4962c05af..000000000
--- a/pyload/plugins/hoster/XvidstageCom.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# -*- 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: 4Christopher
-"""
-
-import re
-import HTMLParser
-
-from module.plugins.Hoster import Hoster
-from module.network.RequestFactory import getURL
-
-
-def setup(self):
- self.wantReconnect = False
- self.resumeDownload = True
- self.multiDL = True
-
-
-def getInfo(urls):
- result = []
-
- for url in urls:
- result.append(parseFileInfo(url, getInfoMode=True))
- yield result
-
-
-def parseFileInfo(url, getInfoMode=False):
- html = getURL(url)
- info = {"name": url, "size": 0, "status": 3}
- try:
- info['name'] = re.search(r'(?:Filename|Dateiname):</b></td><td nowrap[^>]*?>(.*?)<', html).group(1)
- info['size'] = re.search(r'(?:Size|Größe):</b></td><td>.*? <small>\((\d+?) bytes\)', html).group(1)
- except: ## The file is offline
- info['status'] = 1
- else:
- info['status'] = 2
-
- if getInfoMode:
- return info['name'], info['size'], info['status'], url
- else:
- return info['name'], info['size'], info['status'], html
-
-
-class XvidstageCom(Hoster):
- __name__ = 'XvidstageCom'
- __version__ = '0.4'
- __pattern__ = r'http://(?:www.)?xvidstage.com/(?P<id>[0-9A-Za-z]+)'
- __type__ = 'hoster'
- __description__ = """A Plugin that allows you to download files from http://xvidstage.com"""
- __author_name__ = ('4Christopher')
- __author_mail__ = ('4Christopher@gmx.de')
-
-
- def process(self, pyfile):
- pyfile.name, pyfile.size, pyfile.status, self.html = parseFileInfo(pyfile.url)
- self.logDebug('Name: %s' % pyfile.name)
- if pyfile.status == 1: ## offline
- self.offline()
- self.id = re.search(self.__pattern__, pyfile.url).group('id')
-
- wait_sec = int(re.search(r'countdown_str">.+?>(\d+?)<', self.html).group(1))
- self.setWait(wait_sec, reconnect=False)
- self.logDebug('Waiting %d seconds before submitting the captcha' % wait_sec)
- self.wait()
-
- rand = re.search(r'<input type="hidden" name="rand" value="(.*?)">', self.html).group(1)
- self.logDebug('rand: %s, id: %s' % (rand, self.id))
- self.html = self.req.load(pyfile.url,
- post={'op': 'download2', 'id': self.id, 'rand': rand, 'code': self.get_captcha()})
- file_url = re.search(r'<a href="(?P<url>.*?)">(?P=url)</a>', self.html).group('url')
- try:
- hours_file_available = int(
- re.search(r'This direct link will be available for your IP next (?P<hours>\d+?) hours',
- self.html).group('hours'))
- self.logDebug(
- 'You have %d hours to download this file with your current IP address.' % hours_file_available)
- except:
- self.logDebug('Failed')
- self.logDebug('Download file: %s' % file_url)
- self.download(file_url)
- check = self.checkDownload({'empty': re.compile(r'^$')})
-
- if check == 'empty':
- self.logInfo('Downloaded File was empty')
- # self.retry()
-
- def get_captcha(self):
- ## <span style='position:absolute;padding-left:7px;padding-top:6px;'>&#49; …
- cap_chars = {}
- for pad_left, char in re.findall(r"position:absolute;padding-left:(\d+?)px;.*?;'>(.*?)<", self.html):
- cap_chars[int(pad_left)] = char
-
- h = HTMLParser.HTMLParser()
- ## Sorting after padding-left
- captcha = ''
- for pad_left in sorted(cap_chars):
- captcha += h.unescape(cap_chars[pad_left])
-
- self.logDebug('The captcha is: %s' % captcha)
- return captcha
diff --git a/pyload/plugins/hoster/YoutubeCom.py b/pyload/plugins/hoster/YoutubeCom.py
index 70db597cf..129b948bf 100644
--- a/pyload/plugins/hoster/YoutubeCom.py
+++ b/pyload/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.34"
__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),
@@ -76,24 +76,24 @@ class YoutubeCom(Hoster):
def process(self, pyfile):
html = self.load(pyfile.url, decode=True)
- if '<h1 id="unavailable-message" class="message">' in html:
+ if re.search(r'<div id="player-unavailable" class="\s*player-width player-height\s*">', html):
self.offline()
if "We have been receiving a large volume of requests from your network." in html:
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/pyload/plugins/hoster/ZippyshareCom.py b/pyload/plugins/hoster/ZippyshareCom.py
index 84974e7ba..756a92ef3 100644
--- a/pyload/plugins/hoster/ZippyshareCom.py
+++ b/pyload/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)