summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/accounts/AlldebridCom.py4
-rw-r--r--module/plugins/accounts/DepositfilesCom.py2
-rw-r--r--module/plugins/accounts/FastixRu.py11
-rw-r--r--module/plugins/accounts/FilesMailRu.py2
-rw-r--r--module/plugins/accounts/FileserveCom.py2
-rw-r--r--module/plugins/accounts/MegaDebridEu.py2
-rwxr-xr-xmodule/plugins/accounts/NetloadIn.py2
-rw-r--r--module/plugins/accounts/PremiumTo.py4
-rw-r--r--module/plugins/accounts/PremiumizeMe.py7
-rw-r--r--module/plugins/accounts/RPNetBiz.py2
-rw-r--r--module/plugins/accounts/RapidshareCom.py55
-rw-r--r--module/plugins/accounts/RapiduNet.py38
-rw-r--r--module/plugins/accounts/RehostTo.py11
-rw-r--r--module/plugins/accounts/SimplydebridCom.py2
-rw-r--r--module/plugins/accounts/UploadheroCom.py2
-rw-r--r--module/plugins/captcha/GigasizeCom.py2
-rw-r--r--module/plugins/captcha/LinksaveIn.py2
-rw-r--r--module/plugins/captcha/NetloadIn.py2
-rw-r--r--module/plugins/captcha/ShareonlineBiz.py2
-rw-r--r--module/plugins/captcha/captcha.py27
-rw-r--r--module/plugins/container/CCF.py9
-rw-r--r--module/plugins/crypter/BitshareComFolder.py5
-rw-r--r--module/plugins/crypter/ChipDe.py2
-rw-r--r--module/plugins/crypter/CrockoComFolder.py5
-rw-r--r--module/plugins/crypter/CzshareComFolder.py2
-rw-r--r--module/plugins/crypter/DDLMusicOrg.py2
-rw-r--r--module/plugins/crypter/DataHuFolder.py5
-rw-r--r--module/plugins/crypter/DepositfilesComFolder.py5
-rw-r--r--module/plugins/crypter/Dereferer.py2
-rw-r--r--module/plugins/crypter/DevhostStFolder.py5
-rw-r--r--module/plugins/crypter/DlProtectCom.py5
-rw-r--r--module/plugins/crypter/DontKnowMe.py2
-rw-r--r--module/plugins/crypter/EasybytezComFolder.py5
-rw-r--r--module/plugins/crypter/FilecloudIoFolder.py5
-rw-r--r--module/plugins/crypter/FilecryptCc.py8
-rw-r--r--module/plugins/crypter/FilefactoryComFolder.py5
-rw-r--r--module/plugins/crypter/FilerNetFolder.py5
-rw-r--r--module/plugins/crypter/FilestubeCom.py5
-rw-r--r--module/plugins/crypter/FiletramCom.py5
-rw-r--r--module/plugins/crypter/FourChanOrg.py2
-rw-r--r--module/plugins/crypter/FreakhareComFolder.py5
-rw-r--r--module/plugins/crypter/FreetexthostCom.py5
-rw-r--r--module/plugins/crypter/FshareVnFolder.py5
-rw-r--r--module/plugins/crypter/HoerbuchIn.py2
-rw-r--r--module/plugins/crypter/HotfileComFolder.py2
-rw-r--r--module/plugins/crypter/ImgurComAlbum.py5
-rw-r--r--module/plugins/crypter/JunocloudMeFolder.py5
-rw-r--r--module/plugins/crypter/LetitbitNetFolder.py2
-rw-r--r--module/plugins/crypter/LinkSaveIn.py5
-rw-r--r--module/plugins/crypter/MediafireComFolder.py6
-rw-r--r--module/plugins/crypter/MegaRapidCzFolder.py5
-rw-r--r--module/plugins/crypter/MultiUpOrg.py5
-rw-r--r--module/plugins/crypter/MultiloadCz.py2
-rw-r--r--module/plugins/crypter/NCryptIn.py4
-rw-r--r--module/plugins/crypter/NetfolderIn.py5
-rw-r--r--module/plugins/crypter/NosvideoCom.py5
-rw-r--r--module/plugins/crypter/OneKhDe.py2
-rw-r--r--module/plugins/crypter/PastebinCom.py5
-rw-r--r--module/plugins/crypter/QuickshareCzFolder.py2
-rw-r--r--module/plugins/crypter/RapidfileshareNetFolder.py5
-rw-r--r--module/plugins/crypter/RelinkUs.py25
-rw-r--r--module/plugins/crypter/SafelinkingNet.py2
-rw-r--r--module/plugins/crypter/SpeedLoadOrgFolder.py2
-rw-r--r--module/plugins/crypter/StealthTo.py2
-rw-r--r--module/plugins/crypter/TnyCz.py5
-rw-r--r--module/plugins/crypter/TurbobitNetFolder.py5
-rw-r--r--module/plugins/crypter/TusfilesNetFolder.py5
-rw-r--r--module/plugins/crypter/UlozToFolder.py2
-rw-r--r--module/plugins/crypter/UploadableChFolder.py5
-rw-r--r--module/plugins/crypter/UploadedToFolder.py5
-rw-r--r--module/plugins/crypter/XFileSharingProFolder.py5
-rw-r--r--module/plugins/crypter/XupPl.py2
-rw-r--r--module/plugins/hooks/AlldebridCom.py2
-rw-r--r--module/plugins/hooks/BypassCaptcha.py7
-rwxr-xr-xmodule/plugins/hooks/Captcha9kw.py7
-rw-r--r--module/plugins/hooks/CaptchaBrotherhood.py7
-rw-r--r--module/plugins/hooks/Checksum.py7
-rw-r--r--module/plugins/hooks/ClickAndLoad.py7
-rw-r--r--module/plugins/hooks/DeathByCaptcha.py7
-rw-r--r--module/plugins/hooks/DownloadScheduler.py7
-rw-r--r--module/plugins/hooks/EasybytezCom.py17
-rw-r--r--module/plugins/hooks/ExpertDecoders.py7
-rw-r--r--module/plugins/hooks/ExternalScripts.py7
-rw-r--r--module/plugins/hooks/ExtractArchive.py7
-rw-r--r--module/plugins/hooks/FastixRu.py5
-rw-r--r--module/plugins/hooks/FreeWayMe.py2
-rw-r--r--module/plugins/hooks/IRCInterface.py7
-rw-r--r--module/plugins/hooks/ImageTyperz.py7
-rw-r--r--module/plugins/hooks/LinkdecrypterCom.py7
-rw-r--r--module/plugins/hooks/LinksnappyCom.py2
-rw-r--r--module/plugins/hooks/MegaDebridEu.py2
-rw-r--r--module/plugins/hooks/MergeFiles.py68
-rw-r--r--module/plugins/hooks/MultiHome.py7
-rw-r--r--module/plugins/hooks/MyfastfileCom.py2
-rw-r--r--module/plugins/hooks/OverLoadMe.py3
-rw-r--r--module/plugins/hooks/PremiumizeMe.py4
-rw-r--r--module/plugins/hooks/RPNetBiz.py4
-rw-r--r--module/plugins/hooks/RehostTo.py3
-rw-r--r--module/plugins/hooks/RestartSlow.py52
-rw-r--r--module/plugins/hooks/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hooks/SimplydebridCom.py2
-rw-r--r--module/plugins/hooks/SkipRev.py68
-rw-r--r--module/plugins/hooks/UnSkipOnFail.py7
-rw-r--r--module/plugins/hooks/UnrestrictLi.py2
-rw-r--r--module/plugins/hooks/WindowsPhoneToastNotify.py7
-rw-r--r--module/plugins/hooks/XFileSharingPro.py13
-rw-r--r--module/plugins/hooks/ZeveraCom.py2
-rw-r--r--module/plugins/hoster/AlldebridCom.py8
-rw-r--r--module/plugins/hoster/BasePlugin.py5
-rw-r--r--module/plugins/hoster/BezvadataCz.py3
-rw-r--r--module/plugins/hoster/BitshareCom.py10
-rw-r--r--module/plugins/hoster/CatShareNet.py6
-rw-r--r--module/plugins/hoster/DailymotionCom.py43
-rw-r--r--module/plugins/hoster/DataHu.py2
-rw-r--r--module/plugins/hoster/DebridItaliaCom.py2
-rw-r--r--module/plugins/hoster/DlFreeFr.py92
-rw-r--r--module/plugins/hoster/DodanePl.py2
-rw-r--r--module/plugins/hoster/FastixRu.py7
-rw-r--r--module/plugins/hoster/FastshareCz.py5
-rw-r--r--module/plugins/hoster/FileSharkPl.py4
-rw-r--r--module/plugins/hoster/FileStoreTo.py3
-rw-r--r--module/plugins/hoster/FilecloudIo.py11
-rw-r--r--module/plugins/hoster/FilepostCom.py37
-rw-r--r--module/plugins/hoster/FilerNet.py15
-rw-r--r--module/plugins/hoster/FileserveCom.py10
-rw-r--r--module/plugins/hoster/FilezyNet.py2
-rw-r--r--module/plugins/hoster/FlyFilesNet.py2
-rw-r--r--module/plugins/hoster/FreeWayMe.py4
-rw-r--r--module/plugins/hoster/FreevideoCz.py2
-rw-r--r--module/plugins/hoster/GamefrontCom.py5
-rw-r--r--module/plugins/hoster/GooIm.py3
-rw-r--r--module/plugins/hoster/IfileIt.py27
-rw-r--r--module/plugins/hoster/JumbofilesCom.py3
-rw-r--r--module/plugins/hoster/Keep2shareCc.py25
-rw-r--r--module/plugins/hoster/KingfilesNet.py32
-rw-r--r--module/plugins/hoster/LoadTo.py7
-rw-r--r--module/plugins/hoster/MediafireCom.py8
-rw-r--r--module/plugins/hoster/MegaCoNz.py33
-rw-r--r--module/plugins/hoster/MegaDebridEu.py2
-rw-r--r--module/plugins/hoster/MegasharesCom.py19
-rw-r--r--module/plugins/hoster/MultishareCz.py9
-rw-r--r--module/plugins/hoster/MyvideoDe.py2
-rw-r--r--module/plugins/hoster/NetloadIn.py11
-rw-r--r--module/plugins/hoster/NowDownloadSx.py (renamed from module/plugins/hoster/NowDownloadEu.py)15
-rw-r--r--module/plugins/hoster/NowVideoSx.py (renamed from module/plugins/hoster/NowVideoAt.py)10
-rw-r--r--module/plugins/hoster/OboomCom.py2
-rw-r--r--module/plugins/hoster/OneFichierCom.py2
-rw-r--r--module/plugins/hoster/PornhostCom.py2
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/PremiumTo.py8
-rw-r--r--module/plugins/hoster/PremiumizeMe.py9
-rw-r--r--module/plugins/hoster/RPNetBiz.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py12
-rw-r--r--module/plugins/hoster/RapidshareCom.py228
-rw-r--r--module/plugins/hoster/RapiduNet.py12
-rw-r--r--module/plugins/hoster/RealdebridCom.py9
-rw-r--r--module/plugins/hoster/RedtubeCom.py2
-rw-r--r--module/plugins/hoster/RehostTo.py5
-rw-r--r--module/plugins/hoster/RgHostNet.py13
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hoster/SimplydebridCom.py9
-rw-r--r--module/plugins/hoster/SoundcloudCom.py2
-rw-r--r--module/plugins/hoster/StreamCz.py4
-rw-r--r--module/plugins/hoster/TusfilesNet.py2
-rw-r--r--module/plugins/hoster/TwoSharedCom.py3
-rw-r--r--module/plugins/hoster/UlozTo.py2
-rw-r--r--module/plugins/hoster/UnrestrictLi.py2
-rw-r--r--module/plugins/hoster/UploadableCh.py4
-rw-r--r--module/plugins/hoster/UploadedTo.py6
-rw-r--r--module/plugins/hoster/UpstoreNet.py6
-rw-r--r--module/plugins/hoster/VeohCom.py5
-rw-r--r--module/plugins/hoster/VimeoCom.py5
-rw-r--r--module/plugins/hoster/Vipleech4uCom.py2
-rw-r--r--module/plugins/hoster/XVideosCom.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YoutubeCom.py47
-rw-r--r--module/plugins/hoster/ZDF.py2
-rw-r--r--module/plugins/hoster/ZeveraCom.py5
-rw-r--r--module/plugins/internal/AbstractExtractor.py2
-rw-r--r--module/plugins/internal/CaptchaService.py203
-rw-r--r--module/plugins/internal/MultiHoster.py45
-rw-r--r--module/plugins/internal/SimpleHoster.py24
-rw-r--r--module/plugins/internal/UnZip.py2
-rw-r--r--module/plugins/internal/XFSCrypter.py4
184 files changed, 1028 insertions, 942 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 344b54e4f..1fb5e4b54 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -36,8 +36,8 @@ class AlldebridCom(Account):
#Get expiration date from API
except:
data = self.getAccountData(user)
- page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user,
- data['password']))
+ page = req.load("http://www.alldebrid.com/api.php",
+ get={'action': "info_user", 'login': user, 'pw': data['password']})
self.logDebug(page)
xml = dom.parseString(page)
exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60
diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py
index 437265c3f..1cfb96e84 100644
--- a/module/plugins/accounts/DepositfilesCom.py
+++ b/module/plugins/accounts/DepositfilesCom.py
@@ -10,7 +10,7 @@ from module.plugins.Account import Account
class DepositfilesCom(Account):
__name__ = "DepositfilesCom"
__type__ = "account"
- __version__ = "0.3"
+ __version__ = "0.30"
__description__ = """Depositfiles.com account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 049ee9f77..ced49125a 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -16,11 +16,11 @@ class FastixRu(Account):
def loadAccountInfo(self, user, req):
data = self.getAccountData(user)
- page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api']))
- page = json_loads(page)
+ page = json_loads(req.load("http://fastix.ru/api_v2/", get={'apikey': data['api'], 'sub': "getaccountdetails"}))
+
points = page['points']
- kb = float(points)
- kb = kb * 1024 ** 2 / 1000
+ kb = float(points) * 1024 ** 2 / 1000
+
if points > 0:
account_info = {"validuntil": -1, "trafficleft": kb}
else:
@@ -29,7 +29,8 @@ class FastixRu(Account):
def login(self, user, data, req):
- page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password']))
+ page = req.load("http://fastix.ru/api_v2/",
+ get={'sub': "get_apikey", 'email': user, 'password': data['password']})
api = json_loads(page)
api = api['apikey']
data['api'] = api
diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py
index 365fa86dc..dcec22644 100644
--- a/module/plugins/accounts/FilesMailRu.py
+++ b/module/plugins/accounts/FilesMailRu.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class FilesMailRu(Account):
__name__ = "FilesMailRu"
__type__ = "account"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Filesmail.ru account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py
index 411ba85b1..6f23f4b43 100644
--- a/module/plugins/accounts/FileserveCom.py
+++ b/module/plugins/accounts/FileserveCom.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class FileserveCom(Account):
__name__ = "FileserveCom"
__type__ = "account"
- __version__ = "0.2"
+ __version__ = "0.20"
__description__ = """Fileserve.com account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py
index e7e22048b..a082b97af 100644
--- a/module/plugins/accounts/MegaDebridEu.py
+++ b/module/plugins/accounts/MegaDebridEu.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class MegaDebridEu(Account):
__name__ = "MegaDebridEu"
__type__ = "account"
- __version__ = "0.2"
+ __version__ = "0.20"
__description__ = """mega-debrid.eu account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py
index be0b8632c..6565e6899 100755
--- a/module/plugins/accounts/NetloadIn.py
+++ b/module/plugins/accounts/NetloadIn.py
@@ -18,7 +18,7 @@ class NetloadIn(Account):
def loadAccountInfo(self, user, req):
- page = req.load("http://netload.in/index.php?id=2&lang=de")
+ page = req.load("http://netload.in/index.php", get={'id': 2, 'lang': "de"})
left = r'>(\d+) (Tag|Tage), (\d+) Stunden<'
left = re.search(left, page)
if left:
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py
index 44bce1c7c..c1a8c661a 100644
--- a/module/plugins/accounts/PremiumTo.py
+++ b/module/plugins/accounts/PremiumTo.py
@@ -26,8 +26,8 @@ class PremiumTo(Account):
def login(self, user, data, req):
self.username = user
self.password = data['password']
- authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % (
- user, self.password)).strip()
+ authcode = req.load("http://premium.to/api/getauthcode.php",
+ get={'username': user, 'password': self.password}).strip()
if "wrong username" in authcode:
self.wrongPassword()
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index 951c340e1..6603165e0 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -42,7 +42,8 @@ class PremiumizeMe(Account):
def getAccountStatus(self, user, req):
# Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api)
# to retrieve account info and return the parsed json answer
- answer = req.load(
- "https://api.premiumize.me/pm-api/v1.php?method=accountstatus&params[login]=%s&params[pass]=%s" % (
- user, self.accounts[user]['password']))
+ answer = req.load("https://api.premiumize.me/pm-api/v1.php",
+ get={'method' : "accountstatus",
+ 'params[login]': user,
+ 'params[pass]' : self.accounts[user]['password']})
return json_loads(answer)
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py
index 4daa56a75..8bd358084 100644
--- a/module/plugins/accounts/RPNetBiz.py
+++ b/module/plugins/accounts/RPNetBiz.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class RPNetBiz(Account):
__name__ = "RPNetBiz"
__type__ = "account"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """RPNet.biz account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py
deleted file mode 100644
index 9e5c70a69..000000000
--- a/module/plugins/accounts/RapidshareCom.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.Account import Account
-
-
-class RapidshareCom(Account):
- __name__ = "RapidshareCom"
- __type__ = "account"
- __version__ = "0.22"
-
- __description__ = """Rapidshare.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("mkaay", "mkaay@mkaay.de")]
-
-
- def loadAccountInfo(self, user, req):
- data = self.getAccountData(user)
- api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user,
- "password": data['password'], "withcookie": 1}
- html = req.load(api_url_base, cookies=False, get=api_param_prem)
- if html.startswith("ERROR"):
- raise Exception(html)
- fields = html.split("\n")
- info = {}
- for t in fields:
- if not t.strip():
- continue
- k, v = t.split("=")
- info[k] = v
-
- validuntil = int(info['billeduntil'])
- premium = True if validuntil else False
-
- tmp = {"premium": premium, "validuntil": validuntil, "trafficleft": -1, "maxtraffic": -1}
-
- return tmp
-
-
- def login(self, user, data, req):
- api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user,
- "password": data['password'], "withcookie": 1}
- html = req.load(api_url_base, cookies=False, get=api_param_prem)
- if html.startswith("ERROR"):
- raise Exception(html + "### Note you have to use your account number for login, instead of name")
- fields = html.split("\n")
- info = {}
- for t in fields:
- if not t.strip():
- continue
- k, v = t.split("=")
- info[k] = v
- cj = self.getAccountCookies(user)
- cj.setCookie("rapidshare.com", "enc", info['cookie'])
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py
index 2fabb6120..fe465bc48 100644
--- a/module/plugins/accounts/RapiduNet.py
+++ b/module/plugins/accounts/RapiduNet.py
@@ -6,40 +6,42 @@ from module.common.json_layer import json_loads
class RapiduNet(Account):
- __name__ = "RapiduNet"
- __type__ = "account"
- __version__ = "0.01"
+ __name__ = "RapiduNet"
+ __type__ = "account"
+ __version__ = "0.02"
__description__ = """Rapidu.net account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("prOq", None)]
+ __license__ = "GPLv3"
+ __authors__ = [("prOq", None)]
- ACCOUNT_INFO_PATTERN = '<a href="premium/" style="padding-left: 0px;">Account: <b>(.*?)</b></a>'
+ PREMIUM_PATTERN = r'<a href="premium/" style="padding-left: 0px;">Account: <b>Premium</b></a>'
def loadAccountInfo(self, user, req):
- premium = False
+ info = {'validuntil': None, 'trafficleft': None, 'premium': False}
- req.load('https://rapidu.net/ajax.php?a=getChangeLang', post={"_go": "", "lang": "en"})
- self.html = req.load('https://rapidu.net/', decode=True)
+ req.load("https://rapidu.net/ajax.php", get={'a': "getChangeLang"}, post={"_go": "", "lang": "en"})
+ html = req.load("https://rapidu.net/", decode=True)
- m = re.search(self.ACCOUNT_INFO_PATTERN, self.html)
- if m:
- if m.group(1) == "Premium":
- premium = True
+ if re.search(self.PREMIUM_PATTERN, html):
+ info['premium'] = True
- return {"validuntil": None, "trafficleft": None, "premium": premium}
+ return info
def login(self, user, data, req):
try:
- json = req.load('https://rapidu.net/ajax.php?a=getUserLogin', post={"_go": "", "login": user, "pass": data['password'], "member": "1"})
- json = json_loads(json)
+ json = json_loads(req.load("https://rapidu.net/ajax.php?a=getUserLogin",
+ post={'_go': "",
+ 'login': user,
+ 'pass': data['password'],
+ 'member': "1"}))
+
self.logDebug(json)
if not json['message'] == "success":
- self.wrongPassword()
+ self.wrongPassword()
+
except Exception, e:
self.logError(e)
-
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 8046f84c0..eec7d8731 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class RehostTo(Account):
__name__ = "RehostTo"
__type__ = "account"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Rehost.to account plugin"""
__license__ = "GPLv3"
@@ -15,12 +15,14 @@ class RehostTo(Account):
def loadAccountInfo(self, user, req):
data = self.getAccountData(user)
- page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': data['password']})
data = [x.split("=") for x in page.split(",")]
ses = data[0][1]
long_ses = data[1][1]
- page = req.load("http://rehost.to/api.php?cmd=get_premium_credits&long_ses=%s" % long_ses)
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "get_premium_credits", 'long_ses': long_ses})
traffic, valid = page.split(",")
account_info = {"trafficleft": int(traffic) * 1024,
@@ -32,7 +34,8 @@ class RehostTo(Account):
def login(self, user, data, req):
- page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': data['password']})
if "Login failed." in page:
self.wrongPassword()
diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py
index 7979fd5d5..406534364 100644
--- a/module/plugins/accounts/SimplydebridCom.py
+++ b/module/plugins/accounts/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class SimplydebridCom(Account):
__name__ = "SimplydebridCom"
__type__ = "account"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Simply-Debrid.com account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py
index be1dfe981..63d823e69 100644
--- a/module/plugins/accounts/UploadheroCom.py
+++ b/module/plugins/accounts/UploadheroCom.py
@@ -10,7 +10,7 @@ from module.plugins.Account import Account
class UploadheroCom(Account):
__name__ = "UploadheroCom"
__type__ = "account"
- __version__ = "0.2"
+ __version__ = "0.20"
__description__ = """Uploadhero.co account plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/captcha/GigasizeCom.py b/module/plugins/captcha/GigasizeCom.py
index 99f432d12..244cf6a2a 100644
--- a/module/plugins/captcha/GigasizeCom.py
+++ b/module/plugins/captcha/GigasizeCom.py
@@ -6,7 +6,7 @@ from module.plugins.captcha.captcha import OCR
class GigasizeCom(OCR):
__name__ = "GigasizeCom"
__type__ = "ocr"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Gigasize.com ocr plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/captcha/LinksaveIn.py b/module/plugins/captcha/LinksaveIn.py
index 41673d8a6..56cbd58a0 100644
--- a/module/plugins/captcha/LinksaveIn.py
+++ b/module/plugins/captcha/LinksaveIn.py
@@ -15,7 +15,7 @@ from module.plugins.captcha.captcha import OCR
class LinksaveIn(OCR):
__name__ = "LinksaveIn"
__type__ = "ocr"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Linksave.in ocr plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/captcha/NetloadIn.py b/module/plugins/captcha/NetloadIn.py
index fc8eecf59..28eb18fb5 100644
--- a/module/plugins/captcha/NetloadIn.py
+++ b/module/plugins/captcha/NetloadIn.py
@@ -6,7 +6,7 @@ from module.plugins.captcha.captcha import OCR
class NetloadIn(OCR):
__name__ = "NetloadIn"
__type__ = "ocr"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Netload.in ocr plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py
index 6e513941d..8210e8859 100644
--- a/module/plugins/captcha/ShareonlineBiz.py
+++ b/module/plugins/captcha/ShareonlineBiz.py
@@ -6,7 +6,7 @@ from module.plugins.captcha.captcha import OCR
class ShareonlineBiz(OCR):
__name__ = "ShareonlineBiz"
__type__ = "ocr"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Shareonline.biz ocr plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/captcha/captcha.py b/module/plugins/captcha/captcha.py
index b67ce9b9e..0f233ec00 100644
--- a/module/plugins/captcha/captcha.py
+++ b/module/plugins/captcha/captcha.py
@@ -18,7 +18,7 @@ from os.path import abspath, join
class OCR(object):
__name__ = "OCR"
__type__ = "ocr"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """OCR base plugin"""
__license__ = "GPLv3"
@@ -81,18 +81,19 @@ class OCR(object):
if subset and (digits or lowercase or uppercase):
#tmpSub = tempfile.NamedTemporaryFile(suffix=".subset")
- tmpSub = open(join("tmp", "tmpSub_%s.subset" % self.__name__), "wb")
- tmpSub.write("tessedit_char_whitelist ")
- if digits:
- tmpSub.write("0123456789")
- if lowercase:
- tmpSub.write("abcdefghijklmnopqrstuvwxyz")
- if uppercase:
- tmpSub.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- tmpSub.write("\n")
- tessparams.append("nobatch")
- tessparams.append(abspath(tmpSub.name))
- tmpSub.close()
+ with open(join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub:
+ tmpSub.write("tessedit_char_whitelist ")
+
+ if digits:
+ tmpSub.write("0123456789")
+ if lowercase:
+ tmpSub.write("abcdefghijklmnopqrstuvwxyz")
+ if uppercase:
+ tmpSub.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+
+ tmpSub.write("\n")
+ tessparams.append("nobatch")
+ tessparams.append(abspath(tmpSub.name))
self.logger.debug("run tesseract")
self.run(tessparams)
diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py
index c7824fcc4..bca535175 100644
--- a/module/plugins/container/CCF.py
+++ b/module/plugins/container/CCF.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
+from __future__ import with_statement
+
import re
from os import makedirs
@@ -14,7 +16,7 @@ from module.utils import save_join
class CCF(Container):
__name__ = "CCF"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'.+\.ccf'
@@ -35,8 +37,7 @@ class CCF(Container):
download_folder = self.config['general']['download_folder']
tempdlc_name = save_join(download_folder, "tmp_%s.dlc" % pyfile.name)
- tempdlc = open(tempdlc_name, "w")
- tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1))
- tempdlc.close()
+ with open(tempdlc_name, "w") as tempdlc:
+ tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1))
self.urls = [tempdlc_name]
diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py
index e4038aebf..c70a849b6 100644
--- a/module/plugins/crypter/BitshareComFolder.py
+++ b/module/plugins/crypter/BitshareComFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class BitshareComFolder(SimpleCrypter):
@@ -19,3 +19,6 @@ class BitshareComFolder(SimpleCrypter):
LINK_PATTERN = r'<a href="(http://bitshare\.com/files/.+)">.+</a></td>'
NAME_PATTERN = r'View public folder "(?P<N>.+)"</h1>'
+
+
+getInfo = create_getInfo(BitshareComFolder)
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py
index 59ed6559e..b342cd1bf 100644
--- a/module/plugins/crypter/ChipDe.py
+++ b/module/plugins/crypter/ChipDe.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class ChipDe(Crypter):
__name__ = "ChipDe"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?chip\.de/video/.*\.html'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py
index 64a1f8bce..bf91b0afc 100644
--- a/module/plugins/crypter/CrockoComFolder.py
+++ b/module/plugins/crypter/CrockoComFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class CrockoComFolder(SimpleCrypter):
@@ -18,3 +18,6 @@ class CrockoComFolder(SimpleCrypter):
LINK_PATTERN = r'<td class="last"><a href="([^"]+)">download</a>'
+
+
+getInfo = create_getInfo(CrockoComFolder)
diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py
index 669f469b2..67376c6e6 100644
--- a/module/plugins/crypter/CzshareComFolder.py
+++ b/module/plugins/crypter/CzshareComFolder.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class CzshareComFolder(Crypter):
__name__ = "CzshareComFolder"
__type__ = "crypter"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.*'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/DDLMusicOrg.py b/module/plugins/crypter/DDLMusicOrg.py
index c2524b180..55181e9ad 100644
--- a/module/plugins/crypter/DDLMusicOrg.py
+++ b/module/plugins/crypter/DDLMusicOrg.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class DDLMusicOrg(Crypter):
__name__ = "DDLMusicOrg"
__type__ = "crypter"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?ddl-music\.org/captcha/ddlm_cr\d\.php\?\d+\?\d+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py
index 0399e686d..a5602d6c6 100644
--- a/module/plugins/crypter/DataHuFolder.py
+++ b/module/plugins/crypter/DataHuFolder.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DataHuFolder(SimpleCrypter):
@@ -38,3 +38,6 @@ class DataHuFolder(SimpleCrypter):
if u'Hib\xe1s jelsz\xf3' in self.html: # Wrong password
self.fail(_("Wrong password"))
+
+
+getInfo = create_getInfo(DataHuFolder)
diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py
index 79c31c97a..147f093c3 100644
--- a/module/plugins/crypter/DepositfilesComFolder.py
+++ b/module/plugins/crypter/DepositfilesComFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DepositfilesComFolder(SimpleCrypter):
@@ -18,3 +18,6 @@ class DepositfilesComFolder(SimpleCrypter):
LINK_PATTERN = r'<div class="progressName"[^>]*>\s*<a href="([^"]+)" title="[^"]*" target="_blank">'
+
+
+getInfo = create_getInfo(DepositfilesComFolder)
diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py
index 70b42b00c..dadc3c8b3 100644
--- a/module/plugins/crypter/Dereferer.py
+++ b/module/plugins/crypter/Dereferer.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class Dereferer(Crypter):
__name__ = "Dereferer"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'https?://([^/]+)/.*?(?P<url>(ht|f)tps?(://|%3A%2F%2F).*)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py
index 192c5962c..5ac9d4faf 100644
--- a/module/plugins/crypter/DevhostStFolder.py
+++ b/module/plugins/crypter/DevhostStFolder.py
@@ -7,7 +7,7 @@ import re
from urlparse import urljoin
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DevhostStFolder(SimpleCrypter):
@@ -56,3 +56,6 @@ class DevhostStFolder(SimpleCrypter):
def getLinks(self):
return [urljoin("http://d-h.st", link) for link in re.findall(self.LINK_PATTERN, self.html)]
+
+
+getInfo = create_getInfo(DevhostStFolder)
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py
index 5efb03c15..0f59e925e 100644
--- a/module/plugins/crypter/DlProtectCom.py
+++ b/module/plugins/crypter/DlProtectCom.py
@@ -5,7 +5,7 @@ import re
from base64 import urlsafe_b64encode
from time import time
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DlProtectCom(SimpleCrypter):
@@ -63,3 +63,6 @@ class DlProtectCom(SimpleCrypter):
pattern = r'<a href="([^/].+?)" target="_blank">'
return re.findall(pattern, self.html)
+
+
+getInfo = create_getInfo(DlProtectCom)
diff --git a/module/plugins/crypter/DontKnowMe.py b/module/plugins/crypter/DontKnowMe.py
index 6783abd7c..8d2a52c2c 100644
--- a/module/plugins/crypter/DontKnowMe.py
+++ b/module/plugins/crypter/DontKnowMe.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class DontKnowMe(Crypter):
__name__ = "DontKnowMe"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?.+$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py
index fa3e6165c..04f9b853b 100644
--- a/module/plugins/crypter/EasybytezComFolder.py
+++ b/module/plugins/crypter/EasybytezComFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.XFSCrypter import XFSCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class EasybytezComFolder(XFSCrypter):
@@ -20,3 +20,6 @@ class EasybytezComFolder(XFSCrypter):
HOSTER_DOMAIN = "easybytez.com"
LOGIN_ACCOUNT = True
+
+
+getInfo = create_getInfo(EasybytezComFolder)
diff --git a/module/plugins/crypter/FilecloudIoFolder.py b/module/plugins/crypter/FilecloudIoFolder.py
index 5640ab5c9..83cce352d 100644
--- a/module/plugins/crypter/FilecloudIoFolder.py
+++ b/module/plugins/crypter/FilecloudIoFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilecloudIoFolder(SimpleCrypter):
@@ -19,3 +19,6 @@ class FilecloudIoFolder(SimpleCrypter):
LINK_PATTERN = r'href="(http://filecloud\.io/\w+)" title'
NAME_PATTERN = r'>(?P<N>.+?) - filecloud\.io<'
+
+
+getInfo = create_getInfo(FilecloudIoFolder)
diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py
index 9623ffdee..9793d4e5b 100644
--- a/module/plugins/crypter/FilecryptCc.py
+++ b/module/plugins/crypter/FilecryptCc.py
@@ -113,10 +113,10 @@ class FilecryptCc(Crypter):
weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks)
for link in weblinks:
- response = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True)
- link2 = re.search('<iframe noresize src="(.*)"></iframe>', response)
- response2 = self.load(link2.group(1), just_header=True, cookies=True)
- self.links.append(response2['location'])
+ res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True)
+ link2 = re.search('<iframe noresize src="(.*)"></iframe>', res)
+ res2 = self.load(link2.group(1), just_header=True, cookies=True)
+ self.links.append(res2['location'])
except Exception, e:
self.logDebug("Error decrypting weblinks: %s" % e)
diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py
index 52c39c386..26e28acbd 100644
--- a/module/plugins/crypter/FilefactoryComFolder.py
+++ b/module/plugins/crypter/FilefactoryComFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilefactoryComFolder(SimpleCrypter):
@@ -26,3 +26,6 @@ class FilefactoryComFolder(SimpleCrypter):
def loadPage(self, page_n):
return self.load(self.pyfile.url, get={'page': page_n})
+
+
+getInfo = create_getInfo(FilefactoryComFolder)
diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py
index a2daba136..00db173bb 100644
--- a/module/plugins/crypter/FilerNetFolder.py
+++ b/module/plugins/crypter/FilerNetFolder.py
@@ -1,6 +1,6 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilerNetFolder(SimpleCrypter):
@@ -24,3 +24,6 @@ class FilerNetFolder(SimpleCrypter):
def getLinks(self):
return ['http://filer.net%s' % link for link in re.findall(self.LINK_PATTERN, self.html)]
+
+
+getInfo = create_getInfo(FilerNetFolder)
diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py
index 29de108e5..16ebdda37 100644
--- a/module/plugins/crypter/FilestubeCom.py
+++ b/module/plugins/crypter/FilestubeCom.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilestubeCom(SimpleCrypter):
@@ -19,3 +19,6 @@ class FilestubeCom(SimpleCrypter):
LINK_PATTERN = r'<a class=\"file-link-main(?: noref)?\" [^>]* href=\"(http://[^\"]+)'
NAME_PATTERN = r'<h1\s*> (?P<N>.+) download\s*</h1>'
+
+
+getInfo = create_getInfo(FilestubeCom)
diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py
index e4c8b6360..76530c589 100644
--- a/module/plugins/crypter/FiletramCom.py
+++ b/module/plugins/crypter/FiletramCom.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FiletramCom(SimpleCrypter):
@@ -20,3 +20,6 @@ class FiletramCom(SimpleCrypter):
LINK_PATTERN = r'\s+(http://.+)'
NAME_PATTERN = r'<title>(?P<N>.+?) - Free Download'
+
+
+getInfo = create_getInfo(FiletramCom)
diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py
index 48592d30a..d6c5c86cc 100644
--- a/module/plugins/crypter/FourChanOrg.py
+++ b/module/plugins/crypter/FourChanOrg.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class FourChanOrg(Crypter):
__name__ = "FourChanOrg"
__type__ = "crypter"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py
index d4d3c6d3c..7c1b7de2b 100644
--- a/module/plugins/crypter/FreakhareComFolder.py
+++ b/module/plugins/crypter/FreakhareComFolder.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FreakhareComFolder(SimpleCrypter):
@@ -36,3 +36,6 @@ class FreakhareComFolder(SimpleCrypter):
'entrys': '20',
'page': page_n - 1,
'order': ''}, decode=True)
+
+
+getInfo = create_getInfo(FreakhareComFolder)
diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py
index 36bc61d35..c33c9ff64 100644
--- a/module/plugins/crypter/FreetexthostCom.py
+++ b/module/plugins/crypter/FreetexthostCom.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FreetexthostCom(SimpleCrypter):
@@ -25,3 +25,6 @@ class FreetexthostCom(SimpleCrypter):
self.error(_("Unable to extract links"))
links = m.group(1)
return links.strip().split("<br />\r\n")
+
+
+getInfo = create_getInfo(FreetexthostCom)
diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py
index e6e67ea13..d31a5c6a0 100644
--- a/module/plugins/crypter/FshareVnFolder.py
+++ b/module/plugins/crypter/FshareVnFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FshareVnFolder(SimpleCrypter):
@@ -18,3 +18,6 @@ class FshareVnFolder(SimpleCrypter):
LINK_PATTERN = r'<li class="w_80pc"><a href="([^"]+)" target="_blank">'
+
+
+getInfo = create_getInfo(FshareVnFolder)
diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py
index 4d4b8fbef..a347e4232 100644
--- a/module/plugins/crypter/HoerbuchIn.py
+++ b/module/plugins/crypter/HoerbuchIn.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class HoerbuchIn(Crypter):
__name__ = "HoerbuchIn"
__type__ = "crypter"
- __version__ = "0.6"
+ __version__ = "0.60"
__pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out\.php\?.+|protection/folder_\d+\.html)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/HotfileComFolder.py b/module/plugins/crypter/HotfileComFolder.py
index a294c04e0..4f40587ad 100644
--- a/module/plugins/crypter/HotfileComFolder.py
+++ b/module/plugins/crypter/HotfileComFolder.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class HotfileComFolder(DeadCrypter):
__name__ = "HotfileComFolder"
__type__ = "crypter"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+'
__config__ = []
diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py
index f8f226a1b..6c074f5f1 100644
--- a/module/plugins/crypter/ImgurComAlbum.py
+++ b/module/plugins/crypter/ImgurComAlbum.py
@@ -1,6 +1,6 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
from module.utils import uniqify
@@ -25,3 +25,6 @@ class ImgurComAlbum(SimpleCrypter):
def getLinks(self):
f = lambda url: "http://" + re.sub(r'(\w{7})s\.', r'\1.', url)
return uniqify(map(f, re.findall(self.LINK_PATTERN, self.html)))
+
+
+getInfo = create_getInfo(ImgurComAlbum)
diff --git a/module/plugins/crypter/JunocloudMeFolder.py b/module/plugins/crypter/JunocloudMeFolder.py
index 509f1f7ec..990f25902 100644
--- a/module/plugins/crypter/JunocloudMeFolder.py
+++ b/module/plugins/crypter/JunocloudMeFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.XFSCrypter import XFSCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class JunocloudMeFolder(XFSCrypter):
@@ -18,3 +18,6 @@ class JunocloudMeFolder(XFSCrypter):
HOSTER_DOMAIN = "junocloud.me"
+
+
+getInfo = create_getInfo(JunocloudMeFolder)
diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py
index e3848e2ab..56ecbc7f8 100644
--- a/module/plugins/crypter/LetitbitNetFolder.py
+++ b/module/plugins/crypter/LetitbitNetFolder.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class LetitbitNetFolder(Crypter):
__name__ = "LetitbitNetFolder"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py
index 46babd156..22aba8afc 100644
--- a/module/plugins/crypter/LinkSaveIn.py
+++ b/module/plugins/crypter/LinkSaveIn.py
@@ -9,7 +9,7 @@ import re
from Crypto.Cipher import AES
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
from module.unescape import unescape
@@ -244,3 +244,6 @@ class LinkSaveIn(SimpleCrypter):
# Log and return
self.logDebug("Package has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(LinkSaveIn)
diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py
index c83de4715..d1dc89518 100644
--- a/module/plugins/crypter/MediafireComFolder.py
+++ b/module/plugins/crypter/MediafireComFolder.py
@@ -42,8 +42,10 @@ class MediafireComFolder(Crypter):
folder_key = m.group(1)
self.logDebug("FOLDER KEY: %s" % folder_key)
- json_resp = json_loads(self.load(
- "http://www.mediafire.com/api/folder/get_info.php?folder_key=%s&response_format=json&version=1" % folder_key))
+ json_resp = json_loads(self.load("http://www.mediafire.com/api/folder/get_info.php",
+ get={'folder_key' : folder_key,
+ 'response_format': "json",
+ 'version' : 1}))
#self.logInfo(json_resp)
if json_resp['response']['result'] == "Success":
for link in json_resp['response']['folder_info']['files']:
diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py
index d9fb828a8..e7dff6c8a 100644
--- a/module/plugins/crypter/MegaRapidCzFolder.py
+++ b/module/plugins/crypter/MegaRapidCzFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class MegaRapidCzFolder(SimpleCrypter):
@@ -18,3 +18,6 @@ class MegaRapidCzFolder(SimpleCrypter):
LINK_PATTERN = r'<td class="soubor"[^>]*><a href="([^"]+)">'
+
+
+getInfo = create_getInfo(MegaRapidCzFolder)
diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py
index 5f3fc8b17..ada8d0728 100644
--- a/module/plugins/crypter/MultiUpOrg.py
+++ b/module/plugins/crypter/MultiUpOrg.py
@@ -3,7 +3,7 @@
import re
from urlparse import urljoin
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class MultiUpOrg(SimpleCrypter):
@@ -36,3 +36,6 @@ class MultiUpOrg(SimpleCrypter):
self.html = self.load(miror_page)
return re.findall(pattern, self.html)
+
+
+getInfo = create_getInfo(MultiUpOrg)
diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py
index 127fe068a..b096f63ef 100644
--- a/module/plugins/crypter/MultiloadCz.py
+++ b/module/plugins/crypter/MultiloadCz.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class MultiloadCz(Crypter):
__name__ = "MultiloadCz"
__type__ = "crypter"
- __version__ = "0.4"
+ __version__ = "0.40"
__pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.*'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py
index 3c08e26c1..1d572e538 100644
--- a/module/plugins/crypter/NCryptIn.py
+++ b/module/plugins/crypter/NCryptIn.py
@@ -156,9 +156,9 @@ class NCryptIn(Crypter):
captcha_key = re.search(r'\?k=(.*?)"', form).group(1)
self.logDebug("Resolving ReCaptcha with key [%s]" % captcha_key)
recaptcha = ReCaptcha(self)
- challenge, code = recaptcha.challenge(captcha_key)
+ challenge, response = recaptcha.challenge(captcha_key)
postData['recaptcha_challenge_field'] = challenge
- postData['recaptcha_response_field'] = code
+ postData['recaptcha_response_field'] = response
# Resolve circlecaptcha
if "circlecaptcha" in form:
diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py
index a47bd0503..bfdf5cb82 100644
--- a/module/plugins/crypter/NetfolderIn.py
+++ b/module/plugins/crypter/NetfolderIn.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class NetfolderIn(SimpleCrypter):
@@ -68,3 +68,6 @@ class NetfolderIn(SimpleCrypter):
links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",")
self.logDebug("Package has %d links" % len(links))
return links
+
+
+getInfo = create_getInfo(NetfolderIn)
diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py
index 3abefdadb..1e280abd2 100644
--- a/module/plugins/crypter/NosvideoCom.py
+++ b/module/plugins/crypter/NosvideoCom.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class NosvideoCom(SimpleCrypter):
@@ -19,3 +19,6 @@ class NosvideoCom(SimpleCrypter):
LINK_PATTERN = r'href="(http://(?:w{3}\.)?nosupload\.com/\?d=\w+)"'
NAME_PATTERN = r'<[tT]itle>Watch (?P<N>.+?)<'
+
+
+getInfo = create_getInfo(NosvideoCom)
diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/OneKhDe.py
index 540f14568..cfb084da8 100644
--- a/module/plugins/crypter/OneKhDe.py
+++ b/module/plugins/crypter/OneKhDe.py
@@ -9,7 +9,7 @@ from module.plugins.Crypter import Crypter
class OneKhDe(Crypter):
__name__ = "OneKhDe"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?1kh\.de/f/'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py
index 1dae39bb8..b3d5a4bea 100644
--- a/module/plugins/crypter/PastebinCom.py
+++ b/module/plugins/crypter/PastebinCom.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class PastebinCom(SimpleCrypter):
@@ -19,3 +19,6 @@ class PastebinCom(SimpleCrypter):
LINK_PATTERN = r'<div class="de\d+">(https?://[^ <]+)(?:[^<]*)</div>'
NAME_PATTERN = r'<div class="paste_box_line1" title="(?P<N>[^"]+)">'
+
+
+getInfo = create_getInfo(PastebinCom)
diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py
index 52d558af7..f84f43fa4 100644
--- a/module/plugins/crypter/QuickshareCzFolder.py
+++ b/module/plugins/crypter/QuickshareCzFolder.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class QuickshareCzFolder(Crypter):
__name__ = "QuickshareCzFolder"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+.*'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/RapidfileshareNetFolder.py b/module/plugins/crypter/RapidfileshareNetFolder.py
index 5531d5a90..fc3d4241e 100644
--- a/module/plugins/crypter/RapidfileshareNetFolder.py
+++ b/module/plugins/crypter/RapidfileshareNetFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.XFSCrypter import XFSCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class RapidfileshareNetFolder(XFSCrypter):
@@ -18,3 +18,6 @@ class RapidfileshareNetFolder(XFSCrypter):
HOSTER_DOMAIN = "rapidfileshare.net"
+
+
+getInfo = create_getInfo(RapidfileshareNetFolder)
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index 1111118b2..94a73cded 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -228,20 +228,29 @@ class RelinkUs(Crypter):
def handleWEBLinks(self):
self.logDebug("Search for WEB links")
+
package_links = []
- fw_params = re.findall(self.WEB_FORWARD_REGEX, self.html)
- self.logDebug("Decrypting %d Web links" % len(fw_params))
- for index, fw_param in enumerate(fw_params):
+ params = re.findall(self.WEB_FORWARD_REGEX, self.html)
+
+ self.logDebug("Decrypting %d Web links" % len(params))
+
+ for index, param in enumerate(params):
try:
- fw_url = self.WEB_FORWARD_URL + "?%s" % fw_param
- self.logDebug("Decrypting Web link %d, %s" % (index + 1, fw_url))
- fw_response = self.load(fw_url, decode=True)
- dl_link = re.search(self.WEB_LINK_REGEX, fw_response).group('link')
- package_links.append(dl_link)
+ url = self.WEB_FORWARD_URL + "?%s" % param
+
+ self.logDebug("Decrypting Web link %d, %s" % (index + 1, url))
+
+ res = self.load(url, decode=True)
+ link = re.search(self.WEB_LINK_REGEX, res).group('link')
+
+ package_links.append(link)
+
except Exception, detail:
self.logDebug("Error decrypting Web link %s, %s" % (index, detail))
+
self.setWait(4)
self.wait()
+
return package_links
diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py
index 9bb6c3229..709083b51 100644
--- a/module/plugins/crypter/SafelinkingNet.py
+++ b/module/plugins/crypter/SafelinkingNet.py
@@ -57,7 +57,7 @@ class SafelinkingNet(Crypter):
challenge, response = captcha.challenge(captchaKey)
postData['adcopy_challenge'] = challenge
- postData['adcopy_response'] = response
+ postData['adcopy_response'] = response
self.html = self.load(url, post=postData)
if "The password you entered was incorrect" in self.html:
diff --git a/module/plugins/crypter/SpeedLoadOrgFolder.py b/module/plugins/crypter/SpeedLoadOrgFolder.py
index 1d3a7df91..ddde7dec2 100644
--- a/module/plugins/crypter/SpeedLoadOrgFolder.py
+++ b/module/plugins/crypter/SpeedLoadOrgFolder.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class SpeedLoadOrgFolder(DeadCrypter):
__name__ = "SpeedLoadOrgFolder"
__type__ = "crypter"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?speedload\.org/(\d+~f$|folder/\d+/)'
__config__ = []
diff --git a/module/plugins/crypter/StealthTo.py b/module/plugins/crypter/StealthTo.py
index e4da3e7e4..5173421f1 100644
--- a/module/plugins/crypter/StealthTo.py
+++ b/module/plugins/crypter/StealthTo.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
class StealthTo(DeadCrypter):
__name__ = "StealthTo"
__type__ = "crypter"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+'
__config__ = []
diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py
index 6dde729f5..d36128550 100644
--- a/module/plugins/crypter/TnyCz.py
+++ b/module/plugins/crypter/TnyCz.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
import re
@@ -25,3 +25,6 @@ class TnyCz(SimpleCrypter):
def getLinks(self):
m = re.search(r'<a id=\'save_paste\' href="(.+save\.php\?hash=.+)">', self.html)
return re.findall(".+", self.load(m.group(1), decode=True)) if m else None
+
+
+getInfo = create_getInfo(TnyCz)
diff --git a/module/plugins/crypter/TurbobitNetFolder.py b/module/plugins/crypter/TurbobitNetFolder.py
index 4e07564af..64fcefac6 100644
--- a/module/plugins/crypter/TurbobitNetFolder.py
+++ b/module/plugins/crypter/TurbobitNetFolder.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
from module.common.json_layer import json_loads
@@ -42,3 +42,6 @@ class TurbobitNetFolder(SimpleCrypter):
id = re.match(self.__pattern__, self.pyfile.url).group("ID")
fixurl = lambda id: "http://turbobit.net/%s.html" % id
return map(fixurl, self._getLinks(id))
+
+
+getInfo = create_getInfo(TurbobitNetFolder)
diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py
index 9533a6e76..0db3470cc 100644
--- a/module/plugins/crypter/TusfilesNetFolder.py
+++ b/module/plugins/crypter/TusfilesNetFolder.py
@@ -4,7 +4,7 @@ import math
import re
from urlparse import urljoin
-from module.plugins.internal.XFSCrypter import XFSCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class TusfilesNetFolder(XFSCrypter):
@@ -43,3 +43,6 @@ class TusfilesNetFolder(XFSCrypter):
for p in xrange(2, pages + 1):
self.html = self.loadPage(p)
self.links += self.getLinks()
+
+
+getInfo = create_getInfo(TusfilesNetFolder)
diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py
index 59c828174..cfb756413 100644
--- a/module/plugins/crypter/UlozToFolder.py
+++ b/module/plugins/crypter/UlozToFolder.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class UlozToFolder(Crypter):
__name__ = "UlozToFolder"
__type__ = "crypter"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(m|soubory)/.*'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/UploadableChFolder.py
index 070753ac0..22f9ca2ed 100644
--- a/module/plugins/crypter/UploadableChFolder.py
+++ b/module/plugins/crypter/UploadableChFolder.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class UploadableChFolder(SimpleCrypter):
@@ -22,3 +22,6 @@ class UploadableChFolder(SimpleCrypter):
NAME_PATTERN = r'<div class="folder"><span>&nbsp;</span>(?P<N>.+?)</div>'
OFFLINE_PATTERN = r'We are sorry... The URL you entered cannot be found on the server.'
TEMP_OFFLINE_PATTERN = r'<div class="icon_err">'
+
+
+getInfo = create_getInfo(UploadableChFolder)
diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py
index 359ba92d0..3e77d73a9 100644
--- a/module/plugins/crypter/UploadedToFolder.py
+++ b/module/plugins/crypter/UploadedToFolder.py
@@ -4,7 +4,7 @@ import re
from urlparse import urljoin
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class UploadedToFolder(SimpleCrypter):
@@ -32,3 +32,6 @@ class UploadedToFolder(SimpleCrypter):
plain_link = urljoin("http://uploaded.net/", m.group('plain'))
return self.load(plain_link).split('\n')[:-1]
+
+
+getInfo = create_getInfo(UploadedToFolder)
diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py
index dffd8909c..10e4d8c83 100644
--- a/module/plugins/crypter/XFileSharingProFolder.py
+++ b/module/plugins/crypter/XFileSharingProFolder.py
@@ -2,7 +2,7 @@
import re
-from module.plugins.internal.XFSCrypter import XFSCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class XFileSharingProFolder(XFSCrypter):
@@ -45,3 +45,6 @@ class XFileSharingProFolder(XFSCrypter):
self.user, data = self.account.selectAccount()
self.req = self.account.getAccountRequest(self.user)
self.premium = self.account.isPremium(self.user)
+
+
+getInfo = create_getInfo(XFileSharingProFolder)
diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py
index c456723b3..25b80860c 100644
--- a/module/plugins/crypter/XupPl.py
+++ b/module/plugins/crypter/XupPl.py
@@ -6,7 +6,7 @@ from module.plugins.Crypter import Crypter
class XupPl(Crypter):
__name__ = "XupPl"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.*'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/hooks/AlldebridCom.py b/module/plugins/hooks/AlldebridCom.py
index c06607a28..2d3c8aad7 100644
--- a/module/plugins/hooks/AlldebridCom.py
+++ b/module/plugins/hooks/AlldebridCom.py
@@ -22,6 +22,6 @@ class AlldebridCom(MultiHoster):
def getHoster(self):
https = "https" if self.getConfig("https") else "http"
- page = getURL(https + "://www.alldebrid.com/api.php?action=get_host").replace("\"", "").strip()
+ page = getURL(https + "://www.alldebrid.com/api.php", get={'action': "get_host"}).replace("\"", "").strip()
return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py
index 7e1ea6424..a32de7f42 100644
--- a/module/plugins/hooks/BypassCaptcha.py
+++ b/module/plugins/hooks/BypassCaptcha.py
@@ -29,7 +29,7 @@ class BypassCaptchaException(Exception):
class BypassCaptcha(Hook):
__name__ = "BypassCaptcha"
__type__ = "hook"
- __version__ = "0.04"
+ __version__ = "0.05"
__config__ = [("force", "bool", "Force BC even if client is connected", False),
("passkey", "password", "Passkey", "")]
@@ -48,6 +48,11 @@ class BypassCaptcha(Hook):
GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py
index ead8aec9a..33ad00c49 100755
--- a/module/plugins/hooks/Captcha9kw.py
+++ b/module/plugins/hooks/Captcha9kw.py
@@ -17,7 +17,7 @@ from module.plugins.Hook import Hook
class Captcha9kw(Hook):
__name__ = "Captcha9kw"
__type__ = "hook"
- __version__ = "0.25"
+ __version__ = "0.26"
__config__ = [("activated" , "bool" , "Activated" , True ),
("ssl" , "bool" , "Use HTTPS" , True ),
@@ -41,6 +41,11 @@ class Captcha9kw(Hook):
API_URL = "http://www.9kw.eu/index.cgi"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
if self.getConfig("ssl"):
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py
index 2ebeb1734..b6e38d8bb 100644
--- a/module/plugins/hooks/CaptchaBrotherhood.py
+++ b/module/plugins/hooks/CaptchaBrotherhood.py
@@ -39,7 +39,7 @@ class CaptchaBrotherhoodException(Exception):
class CaptchaBrotherhood(Hook):
__name__ = "CaptchaBrotherhood"
__type__ = "hook"
- __version__ = "0.05"
+ __version__ = "0.06"
__config__ = [("username", "str", "Username", ""),
("force", "bool", "Force CT even if client is connected", False),
@@ -54,6 +54,11 @@ class CaptchaBrotherhood(Hook):
API_URL = "http://www.captchabrotherhood.com/"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index eeda2d849..18036e020 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -40,7 +40,7 @@ def computeChecksum(local_file, algorithm):
class Checksum(Hook):
__name__ = "Checksum"
__type__ = "hook"
- __version__ = "0.14"
+ __version__ = "0.15"
__config__ = [("check_checksum", "bool", "Check checksum? (If False only size will be verified)", True),
("check_action", "fail;retry;nothing", "What to do if check fails?", "retry"),
@@ -62,6 +62,11 @@ class Checksum(Hook):
'default': r'^(?P<hash>[0-9A-Fa-f]+)\s+\*?(?P<name>.+)$'}
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def coreReady(self):
if not self.getConfig("check_checksum"):
self.logInfo(_("Checksum validation is disabled in plugin configuration"))
diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py
index c9c0f60c0..27d99c71c 100644
--- a/module/plugins/hooks/ClickAndLoad.py
+++ b/module/plugins/hooks/ClickAndLoad.py
@@ -52,7 +52,7 @@ def forward(source, destination):
class ClickAndLoad(Hook):
__name__ = "ClickAndLoad"
__type__ = "hook"
- __version__ = "0.22"
+ __version__ = "0.23"
__config__ = [("activated", "bool", "Activated", True),
("extern", "bool", "Allow external link adding", False)]
@@ -63,6 +63,11 @@ class ClickAndLoad(Hook):
("mkaay", "mkaay@mkaay.de")]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def coreReady(self):
self.port = int(self.config['webinterface']['port'])
if self.config['webinterface']['activated']:
diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py
index df09769ce..f03ac4567 100644
--- a/module/plugins/hooks/DeathByCaptcha.py
+++ b/module/plugins/hooks/DeathByCaptcha.py
@@ -52,7 +52,7 @@ class DeathByCaptchaException(Exception):
class DeathByCaptcha(Hook):
__name__ = "DeathByCaptcha"
__type__ = "hook"
- __version__ = "0.03"
+ __version__ = "0.04"
__config__ = [("username", "str", "Username", ""),
("passkey", "password", "Password", ""),
@@ -67,6 +67,11 @@ class DeathByCaptcha(Hook):
API_URL = "http://api.dbcapi.me/api/"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py
index 14884426f..4996e212d 100644
--- a/module/plugins/hooks/DownloadScheduler.py
+++ b/module/plugins/hooks/DownloadScheduler.py
@@ -10,7 +10,7 @@ from module.plugins.Hook import Hook
class DownloadScheduler(Hook):
__name__ = "DownloadScheduler"
__type__ = "hook"
- __version__ = "0.21"
+ __version__ = "0.22"
__config__ = [("timetable", "str", "List time periods as hh:mm full or number(kB/s)",
"0:00 full, 7:00 250, 10:00 0, 17:00 150"),
@@ -22,6 +22,11 @@ class DownloadScheduler(Hook):
("stickell", "l.stickell@yahoo.it")]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.cb = None # callback to scheduler job; will be by removed hookmanager when hook unloaded
diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py
index 89deaed2b..3faa4fa1a 100644
--- a/module/plugins/hooks/EasybytezCom.py
+++ b/module/plugins/hooks/EasybytezCom.py
@@ -23,14 +23,17 @@ class EasybytezCom(MultiHoster):
user = self.account.selectAccount()[0]
try:
- req = self.account.getAccountRequest(user)
+ req = self.account.getAccountRequest(user)
page = req.load("http://www.easybytez.com")
- m = re.search(r'</textarea>\s*Supported sites:(.*)', page)
- return m.group(1).split(',')
+ hosters = re.search(r'</textarea>\s*Supported sites:(.*)', page).group(1).split(',')
+
except Exception, e:
- self.logDebug(e)
self.logWarning(_("Unable to load supported hoster list, using last known"))
- return ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com",
- "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to",
- "uploaded.to"]
+ self.logDebug(e)
+
+ hosters = ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com",
+ "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to",
+ "uploaded.to"]
+ finally:
+ return hosters
diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py
index 1b9459eb6..1784a270c 100644
--- a/module/plugins/hooks/ExpertDecoders.py
+++ b/module/plugins/hooks/ExpertDecoders.py
@@ -15,7 +15,7 @@ from module.plugins.Hook import Hook
class ExpertDecoders(Hook):
__name__ = "ExpertDecoders"
__type__ = "hook"
- __version__ = "0.01"
+ __version__ = "0.02"
__config__ = [("force", "bool", "Force CT even if client is connected", False),
("passkey", "password", "Access key", "")]
@@ -29,6 +29,11 @@ class ExpertDecoders(Hook):
API_URL = "http://www.fasttypers.org/imagepost.ashx"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
index 5db2037fa..a35e47c03 100644
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -13,7 +13,7 @@ from module.utils import save_join
class ExternalScripts(Hook):
__name__ = "ExternalScripts"
__type__ = "hook"
- __version__ = "0.24"
+ __version__ = "0.25"
__config__ = [("activated", "bool", "Activated", True)]
@@ -29,6 +29,11 @@ class ExternalScripts(Hook):
"allDownloadsFinished", "allDownloadsProcessed"]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.scripts = {}
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 07db13aa1..fc77dbdf6 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -59,7 +59,7 @@ from module.utils import save_join, fs_encode
class ExtractArchive(Hook):
__name__ = "ExtractArchive"
__type__ = "hook"
- __version__ = "0.18"
+ __version__ = "0.19"
__config__ = [("activated", "bool", "Activated", True),
("fullpath", "bool", "Extract full path", True),
@@ -83,6 +83,11 @@ class ExtractArchive(Hook):
event_list = ["allDownloadsProcessed"]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.plugins = []
self.passwords = []
diff --git a/module/plugins/hooks/FastixRu.py b/module/plugins/hooks/FastixRu.py
index fe89a190c..cec6c6f1f 100644
--- a/module/plugins/hooks/FastixRu.py
+++ b/module/plugins/hooks/FastixRu.py
@@ -20,8 +20,9 @@ class FastixRu(MultiHoster):
def getHoster(self):
- page = getURL(
- "http://fastix.ru/api_v2/?apikey=5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y&sub=allowed_sources")
+ page = getURL("http://fastix.ru/api_v2",
+ get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
+ 'sub' : "allowed_sources"})
host_list = json_loads(page)
host_list = host_list['allow']
return host_list
diff --git a/module/plugins/hooks/FreeWayMe.py b/module/plugins/hooks/FreeWayMe.py
index 1d7dd369e..5abec29ba 100644
--- a/module/plugins/hooks/FreeWayMe.py
+++ b/module/plugins/hooks/FreeWayMe.py
@@ -20,6 +20,6 @@ class FreeWayMe(MultiHoster):
def getHoster(self):
- hostis = getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3}).replace("\"", "").strip()
+ hostis = getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip()
self.logDebug("Hosters", hostis)
return [x.strip() for x in hostis.split(",") if x.strip()]
diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py
index 98edc2f7f..efd4e411d 100644
--- a/module/plugins/hooks/IRCInterface.py
+++ b/module/plugins/hooks/IRCInterface.py
@@ -20,7 +20,7 @@ from module.utils import formatSize
class IRCInterface(Thread, Hook):
__name__ = "IRCInterface"
__type__ = "hook"
- __version__ = "0.12"
+ __version__ = "0.13"
__config__ = [("host", "str", "IRC-Server Address", "Enter your server here!"),
("port", "int", "IRC-Server Port", 6667),
@@ -44,6 +44,11 @@ class IRCInterface(Thread, Hook):
self.setDaemon(True)
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def coreReady(self):
self.abort = False
self.more = []
diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py
index b00c5118f..f89d64c37 100644
--- a/module/plugins/hooks/ImageTyperz.py
+++ b/module/plugins/hooks/ImageTyperz.py
@@ -33,7 +33,7 @@ class ImageTyperzException(Exception):
class ImageTyperz(Hook):
__name__ = "ImageTyperz"
__type__ = "hook"
- __version__ = "0.04"
+ __version__ = "0.05"
__config__ = [("username", "str", "Username", ""),
("passkey", "password", "Password", ""),
@@ -50,6 +50,11 @@ class ImageTyperz(Hook):
GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx"
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py
index 0c5f6e754..b0ce335d0 100644
--- a/module/plugins/hooks/LinkdecrypterCom.py
+++ b/module/plugins/hooks/LinkdecrypterCom.py
@@ -10,13 +10,18 @@ from module.utils import remove_chars
class LinkdecrypterCom(Hook):
__name__ = "LinkdecrypterCom"
__type__ = "hook"
- __version__ = "0.20"
+ __version__ = "0.21"
__description__ = """Linkdecrypter.com hook plugin"""
__license__ = "GPLv3"
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def coreReady(self):
try:
self.loadPatterns()
diff --git a/module/plugins/hooks/LinksnappyCom.py b/module/plugins/hooks/LinksnappyCom.py
index aa130f416..82edc30fd 100644
--- a/module/plugins/hooks/LinksnappyCom.py
+++ b/module/plugins/hooks/LinksnappyCom.py
@@ -21,7 +21,7 @@ class LinksnappyCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://gen.linksnappy.com/lseAPI.php?act=FILEHOSTS')
+ json_data = getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"})
json_data = json_loads(json_data)
return json_data['return'].keys()
diff --git a/module/plugins/hooks/MegaDebridEu.py b/module/plugins/hooks/MegaDebridEu.py
index d8e338aec..4f627b7e9 100644
--- a/module/plugins/hooks/MegaDebridEu.py
+++ b/module/plugins/hooks/MegaDebridEu.py
@@ -18,7 +18,7 @@ class MegaDebridEu(MultiHoster):
def getHoster(self):
- reponse = getURL('http://www.mega-debrid.eu/api.php?action=getHosters')
+ reponse = getURL("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"})
json_data = json_loads(reponse)
if json_data['response_code'] == "ok":
diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py
index e6f8bb26f..4de45f958 100644
--- a/module/plugins/hooks/MergeFiles.py
+++ b/module/plugins/hooks/MergeFiles.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
+from __future__ import with_statement
+
import os
import re
@@ -12,7 +14,7 @@ from module.utils import save_join, fs_encode
class MergeFiles(Hook):
__name__ = "MergeFiles"
__type__ = "hook"
- __version__ = "0.12"
+ __version__ = "0.13"
__config__ = [("activated", "bool", "Activated", True)]
@@ -24,6 +26,11 @@ class MergeFiles(Hook):
BUFFER_SIZE = 4096
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
# nothing to do
pass
@@ -48,32 +55,35 @@ class MergeFiles(Hook):
for name, file_list in files.iteritems():
self.logInfo(_("Starting merging of"), name)
- final_file = open(save_join(download_folder, name), "wb")
-
- for splitted_file in file_list:
- self.logDebug("Merging part", splitted_file)
- pyfile = self.core.files.getFile(fid_dict[splitted_file])
- pyfile.setStatus("processing")
- try:
- s_file = open(os.path.join(download_folder, splitted_file), "rb")
- size_written = 0
- s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file)))
- while True:
- f_buffer = s_file.read(self.BUFFER_SIZE)
- if f_buffer:
- final_file.write(f_buffer)
- size_written += self.BUFFER_SIZE
- pyfile.setProgress((size_written * 100) / s_file_size)
- else:
- break
- s_file.close()
- self.logDebug("Finished merging part", splitted_file)
- except Exception, e:
- print_exc()
- finally:
- pyfile.setProgress(100)
- pyfile.setStatus("finished")
- pyfile.release()
-
- final_file.close()
+
+ with open(save_join(download_folder, name), "wb") as final_file:
+ for splitted_file in file_list:
+ self.logDebug("Merging part", splitted_file)
+
+ pyfile = self.core.files.getFile(fid_dict[splitted_file])
+
+ pyfile.setStatus("processing")
+
+ try:
+ with open(os.path.join(download_folder, splitted_file), "rb") as s_file:
+ size_written = 0
+ s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file)))
+ while True:
+ f_buffer = s_file.read(self.BUFFER_SIZE)
+ if f_buffer:
+ final_file.write(f_buffer)
+ size_written += self.BUFFER_SIZE
+ pyfile.setProgress((size_written * 100) / s_file_size)
+ else:
+ break
+ self.logDebug("Finished merging part", splitted_file)
+
+ except Exception, e:
+ print_exc()
+
+ finally:
+ pyfile.setProgress(100)
+ pyfile.setStatus("finished")
+ pyfile.release()
+
self.logInfo(_("Finished merging of"), name)
diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py
index 228e6027d..105a42abd 100644
--- a/module/plugins/hooks/MultiHome.py
+++ b/module/plugins/hooks/MultiHome.py
@@ -8,7 +8,7 @@ from module.plugins.Hook import Hook
class MultiHome(Hook):
__name__ = "MultiHome"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.12"
__config__ = [("interfaces", "str", "Interfaces", "None")]
@@ -17,6 +17,11 @@ class MultiHome(Hook):
__authors__ = [("mkaay", "mkaay@mkaay.de")]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.register = {}
self.interfaces = []
diff --git a/module/plugins/hooks/MyfastfileCom.py b/module/plugins/hooks/MyfastfileCom.py
index 07731f1c2..0cf2c6c22 100644
--- a/module/plugins/hooks/MyfastfileCom.py
+++ b/module/plugins/hooks/MyfastfileCom.py
@@ -21,7 +21,7 @@ class MyfastfileCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://myfastfile.com/api.php?hosts', decode=True)
+ json_data = getURL("http://myfastfile.com/api.php", get={'hosts': ""}, decode=True)
self.logDebug("JSON data", json_data)
json_data = json_loads(json_data)
diff --git a/module/plugins/hooks/OverLoadMe.py b/module/plugins/hooks/OverLoadMe.py
index f4cbdd7fe..baa9b0e0a 100644
--- a/module/plugins/hooks/OverLoadMe.py
+++ b/module/plugins/hooks/OverLoadMe.py
@@ -23,8 +23,7 @@ class OverLoadMe(MultiHoster):
def getHoster(self):
https = "https" if self.getConfig("https") else "http"
page = getURL(https + "://api.over-load.me/hoster.php",
- get={"auth": "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}
- ).replace("\"", "").strip()
+ get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip()
self.logDebug("Hosterlist", page)
return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/module/plugins/hooks/PremiumizeMe.py b/module/plugins/hooks/PremiumizeMe.py
index ec21fbcb4..c18e8cf8e 100644
--- a/module/plugins/hooks/PremiumizeMe.py
+++ b/module/plugins/hooks/PremiumizeMe.py
@@ -30,8 +30,8 @@ class PremiumizeMe(MultiHoster):
# Get supported hosters list from premiumize.me using the
# json API v1 (see https://secure.premiumize.me/?show=api)
- answer = getURL("https://api.premiumize.me/pm-api/v1.php?method=hosterlist&params[login]=%s&params[pass]=%s" % (
- user, data['password']))
+ answer = getURL("https://api.premiumize.me/pm-api/v1.php"
+ get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']})
data = json_loads(answer)
# If account is not valid thera are no hosters available
diff --git a/module/plugins/hooks/RPNetBiz.py b/module/plugins/hooks/RPNetBiz.py
index 01591354d..917cd02de 100644
--- a/module/plugins/hooks/RPNetBiz.py
+++ b/module/plugins/hooks/RPNetBiz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class RPNetBiz(MultiHoster):
__name__ = "RPNetBiz"
__type__ = "hook"
- __version__ = "0.1"
+ __version__ = "0.10"
__config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
("hosterList", "str", "Hoster list (comma separated)", ""),
@@ -29,7 +29,7 @@ class RPNetBiz(MultiHoster):
(user, data) = self.account.selectAccount()
res = getURL("https://premium.rpnet.biz/client_api.php",
- get={"username": user, "password": data['password'], "action": "showHosterList"})
+ get={'username': user, 'password': data['password'], 'action': "showHosterList"})
hoster_list = json_loads(res)
# If account is not valid thera are no hosters available
diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py
index c58abf3f3..1bf7d2555 100644
--- a/module/plugins/hooks/RehostTo.py
+++ b/module/plugins/hooks/RehostTo.py
@@ -20,7 +20,8 @@ class RehostTo(MultiHoster):
def getHoster(self):
- page = getURL("http://rehost.to/api.php?cmd=get_supported_och_dl&long_ses=%s" % self.long_ses)
+ page = getURL("http://rehost.to/api.php",
+ get={'cmd': "get_supported_och_dl", 'long_ses': self.long_ses})
return [x.strip() for x in page.replace("\"", "").split(",")]
diff --git a/module/plugins/hooks/RestartSlow.py b/module/plugins/hooks/RestartSlow.py
index 0e9e213de..587799235 100644
--- a/module/plugins/hooks/RestartSlow.py
+++ b/module/plugins/hooks/RestartSlow.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from pycurl import LOW_SPEED_LIMIT, LOW_SPEED_TIME
+import pycurl
from module.plugins.Hook import Hook
@@ -8,13 +8,13 @@ from module.plugins.Hook import Hook
class RestartSlow(Hook):
__name__ = "RestartSlow"
__type__ = "hook"
- __version__ = "0.01"
+ __version__ = "0.02"
- __config__ = [("free_limit" , "int", "Transfer speed threshold in kilobytes" , 100 ),
- ("free_time" , "int", "Sample interval in minutes" , 5 ),
- ("premium_limit", "int", "Transfer speed threshold for premium download in kilobytes", 300 ),
- ("premium_time" , "int", "Sample interval for premium download in minutes" , 2 ),
- ("safe" , "bool", "Restart if download is resumable" , True)]
+ __config__ = [("free_limit" , "int" , "Transfer speed threshold in kilobytes" , 100 ),
+ ("free_time" , "int" , "Sample interval in minutes" , 5 ),
+ ("premium_limit", "int" , "Transfer speed threshold for premium download in kilobytes", 300 ),
+ ("premium_time" , "int" , "Sample interval for premium download in minutes" , 2 ),
+ ("safe_mode" , "bool", "Don't restart if download is not resumable" , True)]
__description__ = """Restart slow downloads"""
__license__ = "GPLv3"
@@ -24,16 +24,38 @@ class RestartSlow(Hook):
event_list = ["downloadStarts"]
- def downloadStarts(self, pyfile, url, filename):
- if self.getConfig("safe") and not pyfile.plugin.resumeDownload:
+ def setup(self):
+ self.info = {'chunk': {}}
+
+
+ def initPeriodical(self):
+ pass
+
+
+ def periodical(self):
+ if not self.pyfile.req.dl:
return
- type = "premium" if pyfile.plugin.premium else "free"
+ if self.getConfig("safe_mode") and not self.pyfile.plugin.resumeDownload:
+ time = 30
+ limit = 5
+ else:
+ type = "premium" if self.pyfile.plugin.premium else "free"
+ time = max(30, self.getConfig("%s_time" % type) * 60)
+ limit = max(5, self.getConfig("%s_limit" % type) * 1024)
- pyfile.plugin.req.http.c.setopt(LOW_SPEED_TIME, max(30, self.getConfig("%s_time" % type) * 60))
- pyfile.plugin.req.http.c.setopt(LOW_SPEED_LIMIT, max(5, self.getConfig("%s_limit" % type) * 1024))
+ chunks = [chunk for chunk in self.pyfile.req.dl.chunks \
+ if chunk.id not in self.info['chunk'] or self.info['chunk'][chunk.id] not is (time, limit)]
+ for chunk in chunks:
+ chunk.c.setopt(pycurl.LOW_SPEED_TIME , time)
+ chunk.c.setopt(pycurl.LOW_SPEED_LIMIT, limit)
+
+ self.info['chunk'][chunk.id] = (time, limit)
+
+
+ def downloadStarts(self, pyfile, url, filename):
+ if self.cb or (self.getConfig("safe_mode") and not pyfile.plugin.resumeDownload):
+ return
- def downloadFailed(self, pyfile):
- pyfile.plugin.req.http.c.setopt(LOW_SPEED_TIME, 30)
- pyfile.plugin.req.http.c.setopt(LOW_SPEED_LIMIT, 5)
+ super(RestartSlow, self).initPeriodical()
diff --git a/module/plugins/hooks/SimplyPremiumCom.py b/module/plugins/hooks/SimplyPremiumCom.py
index ba0543691..cc7e9183c 100644
--- a/module/plugins/hooks/SimplyPremiumCom.py
+++ b/module/plugins/hooks/SimplyPremiumCom.py
@@ -22,7 +22,7 @@ class SimplyPremiumCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://www.simply-premium.com/api/hosts.php?format=json&online=1')
+ json_data = getURL("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
json_data = json_loads(json_data)
host_list = [element['regex'] for element in json_data['result']]
diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py
index 3fbc0459c..173206e75 100644
--- a/module/plugins/hooks/SimplydebridCom.py
+++ b/module/plugins/hooks/SimplydebridCom.py
@@ -18,5 +18,5 @@ class SimplydebridCom(MultiHoster):
def getHoster(self):
- page = getURL("http://simply-debrid.com/api.php?list=1")
+ page = getURL("http://simply-debrid.com/api.php", get={'list': 1})
return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")]
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py
index feed16a2b..107740a3d 100644
--- a/module/plugins/hooks/SkipRev.py
+++ b/module/plugins/hooks/SkipRev.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-import re
+from urllib import unquote
+from urlparse import urlparse
from module.plugins.Hook import Hook
from module.plugins.Plugin import SkipDownload
@@ -9,48 +10,73 @@ from module.plugins.Plugin import SkipDownload
class SkipRev(Hook):
__name__ = "SkipRev"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.15"
- __config__ = [("auto", "bool", "Automatically keep all rev files needed by package", True),
- ("tokeep", "int" , "Min number of rev files to keep for package" , 1),
- ("unskip", "bool", "Restart a skipped rev when download fails" , True)]
+ __config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)]
__description__ = """Skip files ending with extension rev"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- event_list = ["downloadStarts"]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
- REV = re.compile(r'\.part(\d+)\.rev$')
+ def _setup(self):
+ super(self.pyfile.plugin, self).setup()
+ if self.pyfile.hasStatus("skipped"):
+ raise SkipDownload(self.pyfile.getStatusName() or self.pyfile.pluginname)
- def downloadStarts(self, pyfile, url, filename):
- if self.REV.search(pyfile.name) is None or pyfile.getStatusName() is "unskipped":
+
+ def pyname(self, pyfile):
+ url = pyfile.url
+ plugin = pyfile.plugin
+
+ if hasattr(plugin, "info") and 'name' in plugin.info and plugin.info['name']:
+ name = plugin.info['name']
+
+ elif hasattr(plugin, "parseInfos"):
+ name = next(plugin.parseInfos([url]))['name']
+
+ elif hasattr(plugin, "getInfo"): #@NOTE: if parseInfos was not found, getInfo should be missing too
+ name = plugin.getInfo(url)['name']
+
+ else:
+ self.logWarning("Unable to grab file name")
+ name = urlparse(unquote(url)).path.split('/')[-1])
+
+ return name
+
+
+ def downloadPreparing(self, pyfile):
+ if pyfile.getStatusName() is "unskipped" or not pyname(pyfile).endswith(".rev"):
return
tokeep = self.getConfig("tokeep")
- if tokeep > 0:
+ if tokeep:
saved = [True for link in pyfile.package().getChildren() \
- if link.hasStatus("finished") or link.hasStatus("downloading") and self.REV.search(link.name)].count(True)
+ if link.name.endswith(".rev") and (link.hasStatus("finished") or link.hasStatus("downloading"))].count(True)
- if saved < tokeep:
+ if not saved or saved < tokeep: #: keep one rev at least in auto mode
return
- raise SkipDownload("SkipRev")
+ pyfile.setCustomStatus("SkipRev", "skipped")
+ pyfile.plugin.setup = _setup #: work-around: inject status checker inside the preprocessing routine of the plugin
def downloadFailed(self, pyfile):
- if self.getConfig("auto") is False:
-
- if self.getConfig("unskip") is False:
- return
+ tokeep = self.getConfig("tokeep")
- if self.REV.search(pyfile.name) is None:
- return
+ if not tokeep:
+ return
for link in pyfile.package().getChildren():
- if link.hasStatus("skipped") and self.REV.search(link.name):
- link.setCustomStatus("unskipped", "queued")
+ if link.hasStatus("skipped") and link.name.endswith(".rev"):
+ if tokeep > -1 or pyfile.name.endswith(".rev"):
+ link.setStatus("queued")
+ else:
+ link.setCustomStatus("unskipped", "queued")
return
diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py
index f97d12431..d3baccfc2 100644
--- a/module/plugins/hooks/UnSkipOnFail.py
+++ b/module/plugins/hooks/UnSkipOnFail.py
@@ -10,7 +10,7 @@ from module.utils import fs_encode
class UnSkipOnFail(Hook):
__name__ = "UnSkipOnFail"
__type__ = "hook"
- __version__ = "0.01"
+ __version__ = "0.02"
__config__ = [("activated", "bool", "Activated", True)]
@@ -19,6 +19,11 @@ class UnSkipOnFail(Hook):
__authors__ = [("hagg", None)]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def downloadFailed(self, pyfile):
pyfile_name = basename(pyfile.name)
pid = pyfile.package().id
diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py
index 295cfaf5a..d87265ef4 100644
--- a/module/plugins/hooks/UnrestrictLi.py
+++ b/module/plugins/hooks/UnrestrictLi.py
@@ -22,7 +22,7 @@ class UnrestrictLi(MultiHoster):
def getHoster(self):
- json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json')
+ json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"})
json_data = json_loads(json_data)
host_list = [element['host'] for element in json_data['result']]
diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py
index 053ea47d0..ed305778c 100644
--- a/module/plugins/hooks/WindowsPhoneToastNotify.py
+++ b/module/plugins/hooks/WindowsPhoneToastNotify.py
@@ -9,7 +9,7 @@ from module.plugins.Hook import Hook
class WindowsPhoneToastNotify(Hook):
__name__ = "WindowsPhoneToastNotify"
__type__ = "hook"
- __version__ = "0.02"
+ __version__ = "0.03"
__config__ = [("force", "bool", "Force even if client is connected", False),
("pushId", "str", "pushId", ""),
@@ -21,6 +21,11 @@ class WindowsPhoneToastNotify(Hook):
__authors__ = [("Andy Voigt", "phone-support@hotmail.de")]
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def setup(self):
self.info = {} #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py
index ab5086664..e9b1b454e 100644
--- a/module/plugins/hooks/XFileSharingPro.py
+++ b/module/plugins/hooks/XFileSharingPro.py
@@ -8,11 +8,11 @@ from module.plugins.Hook import Hook
class XFileSharingPro(Hook):
__name__ = "XFileSharingPro"
__type__ = "hook"
- __version__ = "0.24"
+ __version__ = "0.26"
__config__ = [("activated", "bool", "Activated", True),
("use_hoster_list", "bool", "Load listed hosters only", True),
- ("use_crypter_list", "bool", "Load listed crypters only", True),
+ ("use_crypter_list", "bool", "Load listed crypters only", False),
("use_builtin_list", "bool", "Load built-in plugin list", True),
("hoster_list", "str", "Hoster list (comma separated)", ""),
("crypter_list", "str", "Crypter list (comma separated)", "")]
@@ -23,9 +23,9 @@ class XFileSharingPro(Hook):
# event_list = ["pluginConfigChanged"]
- regexp = {'hoster' : (r'https?://(?:www\.)?([\w^_]+(?:\.[a-zA-Z]{2,})+(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)',
+ regexp = {'hoster' : (r'https?://(?:www\.)?([\w.^_]+(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)',
r'https?://(?:[^/]+\.)?(%s)/(?:embed-)?\w+'),
- 'crypter': (r'https?://(?:www\.)?([\w^_]+(?:\.[a-zA-Z]{2,})+(?:\:\d+)?)/(?:user|folder)s?/\w+',
+ 'crypter': (r'https?://(?:www\.)?([\w.^_]+(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:user|folder)s?/\w+',
r'https?://(?:[^/]+\.)?(%s)/(?:user|folder)s?/\w+')}
HOSTER_LIST = [#WORKING HOSTERS:
@@ -44,6 +44,11 @@ class XFileSharingPro(Hook):
# self.loadPattern()
+ #@TODO: Remove in 0.4.10
+ def initPeriodical(self):
+ pass
+
+
def coreReady(self):
self.loadPattern()
diff --git a/module/plugins/hooks/ZeveraCom.py b/module/plugins/hooks/ZeveraCom.py
index 6ea05de4f..6fafb9666 100644
--- a/module/plugins/hooks/ZeveraCom.py
+++ b/module/plugins/hooks/ZeveraCom.py
@@ -18,5 +18,5 @@ class ZeveraCom(MultiHoster):
def getHoster(self):
- page = getURL("http://www.zevera.com/jDownloader.ashx?cmd=gethosters")
+ page = getURL("http://www.zevera.com/jDownloader.ashx", get={'cmd': "gethosters"})
return [x.strip() for x in page.replace("\"", "").split(",")]
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index c7240415d..bdd8ccdff 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -45,12 +45,10 @@ class AlldebridCom(Hoster):
self.fail(_("No AllDebrid account provided"))
else:
self.logDebug("Old URL: %s" % pyfile.url)
- password = self.getPassword().splitlines()
- password = "" if not password else password[0]
+ password = self.getPassword().splitlines()[0] or ""
- url = "http://www.alldebrid.com/service.php?link=%s&json=true&pw=%s" % (pyfile.url, password)
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("http://www.alldebrid.com/service.php",
+ get={'link': pyfile.url, 'json': "true", 'pw': password}))
self.logDebug("Json data", data)
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 0b1888e3b..7b59303ef 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -60,7 +60,7 @@ class BasePlugin(Hoster):
self.logDebug("Logging on to %s" % server)
self.req.addAuth(account.accounts[server]['password'])
else:
- for pwd in pyfile.package().password.splitlines():
+ for pwd in self.getPassword().splitlines():
if ":" in pwd:
self.req.addAuth(pwd.strip())
break
@@ -104,3 +104,6 @@ class BasePlugin(Hoster):
self.fail(_("Too many redirects"))
self.download(unquote(url), disposition=True)
+
+
+getInfo = create_getInfo(BasePlugin)
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index d89616c86..3a0b8e58c 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -23,7 +23,8 @@ class BezvadataCz(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index da393f8fc..17d29680e 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -31,7 +31,7 @@ class BitshareCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.chunkLimit = 1
@@ -115,10 +115,12 @@ class BitshareCom(SimpleHoster):
# Try up to 3 times
for i in xrange(3):
- challenge, code = recaptcha.challenge()
+ challenge, response = recaptcha.challenge()
res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html",
- post={"request": "validateCaptcha", "ajaxid": self.ajaxid,
- "recaptcha_challenge_field": challenge, "recaptcha_response_field": code})
+ post={"request" : "validateCaptcha",
+ "ajaxid" : self.ajaxid,
+ "recaptcha_challenge_field": challenge,
+ "recaptcha_response_field" : response})
if self.handleCaptchaErrors(res):
break
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 63ae2c11c..949a021dd 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -31,7 +31,7 @@ class CatShareNet(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
@@ -50,10 +50,10 @@ class CatShareNet(SimpleHoster):
recaptcha = ReCaptcha(self)
- challenge, code = recaptcha.challenge()
+ challenge, response = recaptcha.challenge()
self.html = self.load(self.pyfile.url,
post={'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field': code})
+ 'recaptcha_response_field' : response})
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index 6dd357260..f07a34f8a 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -9,19 +9,17 @@ from module.plugins.Hoster import Hoster
def getInfo(urls):
- result = [] #: [ .. (name, size, status, url) .. ]
- regex = re.compile(DailymotionCom.__pattern__)
- apiurl = "https://api.dailymotion.com/video/"
+ result = []
+ regex = re.compile(DailymotionCom.__pattern__)
+ apiurl = "https://api.dailymotion.com/video/%s"
request = {"fields": "access_error,status,title"}
+
for url in urls:
- id = regex.search(url).group("ID")
- page = getURL(apiurl + id, get=request)
+ id = regex.match(url).group("ID")
+ page = getURL(apiurl % id, get=request)
info = json_loads(page)
- if "title" in info:
- name = info['title'] + ".mp4"
- else:
- name = url
+ name = info['title'] + ".mp4" if "title" in info else url
if "error" in info or info['access_error']:
status = "offline"
@@ -35,16 +33,17 @@ def getInfo(urls):
status = "offline"
result.append((name, 0, statusMap[status], url))
+
return result
class DailymotionCom(Hoster):
__name__ = "DailymotionCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
- __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*?video/(?P<ID>[\w^_]+)'
- __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")]
+ __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)'
+ __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")]
__description__ = """Dailymotion.com hoster plugin"""
__license__ = "GPLv3"
@@ -52,29 +51,36 @@ class DailymotionCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def getStreams(self):
streams = []
+
for result in re.finditer(r"\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"",
self.html):
url = result.group("URL")
- qf = result.group("QF")
- link = url.replace("\\", "")
+ qf = result.group("QF")
+
+ link = url.replace("\\", "")
quality = tuple(int(x) for x in qf.split("x"))
+
streams.append((quality, link))
+
return sorted(streams, key=lambda x: x[0][::-1])
def getQuality(self):
q = self.getConfig("quality")
+
if q == "Lowest":
quality = 0
elif q == "Highest":
quality = -1
else:
quality = int(q.rsplit(" ")[1][:-1])
+
return quality
@@ -91,14 +97,18 @@ class DailymotionCom(Hoster):
idx = quality
s = streams[idx]
+
self.logInfo(_("Download video quality %sx%s") % s[0])
+
return s[1]
def checkInfo(self, pyfile):
pyfile.name, pyfile.size, pyfile.status, pyfile.url = getInfo([pyfile.url])[0]
+
if pyfile.status == 1:
self.offline()
+
elif pyfile.status == 6:
self.tempOffline()
@@ -111,6 +121,5 @@ class DailymotionCom(Hoster):
streams = self.getStreams()
quality = self.getQuality()
- link = self.getLink(streams, quality)
- self.download(link)
+ self.download(self.getLink(streams, quality))
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 74d631e7b..437fea7cd 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -28,7 +28,7 @@ class DataHu(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handleFree(self):
diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py
index cb5d4c06a..17342b8cd 100644
--- a/module/plugins/hoster/DebridItaliaCom.py
+++ b/module/plugins/hoster/DebridItaliaCom.py
@@ -38,7 +38,7 @@ class DebridItaliaCom(Hoster):
self.fail(_("No DebridItalia account provided"))
else:
- html = self.load("http://www.debriditalia.com/api.php?generate=&link=%s" % pyfile.url)
+ html = self.load("http://www.debriditalia.com/api.php", get={'generate': "", 'link': pyfile.url})
if "ERROR" in html:
self.fail(re.search(r'ERROR:(.*)', html).strip())
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index 8bc883fea..793c81b1c 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -3,9 +3,9 @@
import pycurl
import re
-from module.common.json_layer import json_loads
from module.network.Browser import Browser
from module.network.CookieJar import CookieJar
+from module.plugins.internal.CaptchaService import AdYouLike
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns
@@ -33,87 +33,10 @@ class CustomBrowser(Browser):
return Browser.load(self, *args, **kwargs)
-class AdYouLike:
- """
- Class to support adyoulike captcha service
- """
- ADYOULIKE_INPUT_PATTERN = r'Adyoulike\.create\((.*?)\);'
- ADYOULIKE_CALLBACK = r'Adyoulike\.g\._jsonp_5579316662423138'
- ADYOULIKE_CHALLENGE_PATTERN = ADYOULIKE_CALLBACK + r'\((.*?)\)'
-
-
- def __init__(self, plugin, engine="adyoulike"):
- self.plugin = plugin
- self.engine = engine
-
-
- def challenge(self, html):
- adyoulike_data_string = None
- m = re.search(self.ADYOULIKE_INPUT_PATTERN, html)
- if m:
- adyoulike_data_string = m.group(1)
- else:
- self.plugin.fail("Can't read AdYouLike input data")
-
- # {"adyoulike":{"key":"P~zQ~O0zV0WTiAzC-iw0navWQpCLoYEP"},
- # "all":{"element_id":"ayl_private_cap_92300","lang":"fr","env":"prod"}}
- ayl_data = json_loads(adyoulike_data_string)
-
- res = self.plugin.load(
- r'http://api-ayl.appspot.com/challenge?key=%(ayl_key)s&env=%(ayl_env)s&callback=%(callback)s' % {
- "ayl_key": ayl_data[self.engine]['key'], "ayl_env": ayl_data['all']['env'],
- "callback": self.ADYOULIKE_CALLBACK})
-
- m = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res)
- challenge_string = None
- if m:
- challenge_string = m.group(1)
- else:
- self.plugin.fail("Invalid AdYouLike challenge")
- challenge_data = json_loads(challenge_string)
-
- return ayl_data, challenge_data
-
-
- def result(self, ayl, challenge):
- """
- Adyoulike.g._jsonp_5579316662423138
- ({"translations":{"fr":{"instructions_visual":"Recopiez « Soonnight » ci-dessous :"}},
- "site_under":true,"clickable":true,"pixels":{"VIDEO_050":[],"DISPLAY":[],"VIDEO_000":[],"VIDEO_100":[],
- "VIDEO_025":[],"VIDEO_075":[]},"medium_type":"image/adyoulike",
- "iframes":{"big":"<iframe src=\"http://www.soonnight.com/campagn.html\" scrolling=\"no\"
- height=\"250\" width=\"300\" frameborder=\"0\"></iframe>"},"shares":{},"id":256,
- "token":"e6QuI4aRSnbIZJg02IsV6cp4JQ9~MjA1","formats":{"small":{"y":300,"x":0,"w":300,"h":60},
- "big":{"y":0,"x":0,"w":300,"h":250},"hover":{"y":440,"x":0,"w":300,"h":60}},
- "tid":"SqwuAdxT1EZoi4B5q0T63LN2AkiCJBg5"})
- """
- response = None
- try:
- instructions_visual = challenge['translations'][ayl['all']['lang']]['instructions_visual']
- m = re.search(u".*«(.*)».*", instructions_visual)
- if m:
- response = m.group(1).strip()
- else:
- self.plugin.fail("Can't parse instructions visual")
- except KeyError:
- self.plugin.fail("No instructions visual")
-
- #TODO: Supports captcha
-
- if not response:
- self.plugin.fail("AdYouLike result failed")
-
- return {"_ayl_captcha_engine": self.engine,
- "_ayl_env": ayl['all']['env'],
- "_ayl_tid": challenge['tid'],
- "_ayl_token_challenge": challenge['token'],
- "_ayl_response": response}
-
-
class DlFreeFr(SimpleHoster):
__name__ = "DlFreeFr"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.26"
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)'
@@ -130,9 +53,10 @@ class DlFreeFr(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.limitDL = 5
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.limitDL = 5
+ self.chunkLimit = 1
def init(self):
@@ -168,9 +92,7 @@ class DlFreeFr(SimpleHoster):
action, inputs = self.parseHtmlForm('action="getfile.pl"')
adyoulike = AdYouLike(self)
- ayl, challenge = adyoulike.challenge(self.html)
- result = adyoulike.result(ayl, challenge)
- inputs.update(result)
+ inputs.update(adyoulike.challenge())
self.load("http://dl.free.fr/getfile.pl", post=inputs)
headers = self.getLastHeaders()
diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py
index 58f1c02d8..65d8452fa 100644
--- a/module/plugins/hoster/DodanePl.py
+++ b/module/plugins/hoster/DodanePl.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.DeadHoster import DeadHoster, parseFileInfo
+from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DodanePl(DeadHoster):
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 59b4bd24f..1e47638ea 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -46,10 +46,13 @@ class FastixRu(Hoster):
self.logDebug("Old URL: %s" % pyfile.url)
api_key = self.account.getAccountData(self.user)
api_key = api_key['api']
- url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
- page = self.load(url)
+
+ page = self.load("http://fastix.ru/api_v2/",
+ get={'apikey': api_key, 'sub': "getdirectlink", 'link': pyfile.url})
data = json_loads(page)
+
self.logDebug("Json data", data)
+
if "error\":true" in page:
self.offline()
else:
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 1f1e9e6ee..5e2057aa5 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
@@ -20,8 +20,7 @@ class FastshareCz(SimpleHoster):
URL_REPLACEMENTS = [("#.*", "")]
- COOKIES = [("fastshare.cz", "lang", "en")]
- CONTENT_DISPOSITION = True
+ COOKIES = [("fastshare.cz", "lang", "en")]
INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>[\w^_]+),'
OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)'
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index ea2b56821..25825a229 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}'
@@ -20,8 +20,6 @@ class FileSharkPl(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- CONTENT_DISPOSITION = True
-
NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index 8e3ba7177..e1bd8da71 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -23,7 +23,8 @@ class FileStoreTo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 85ea3dae4..cb9782f23 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -34,8 +34,9 @@ class FilecloudIo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def handleFree(self):
@@ -57,9 +58,9 @@ class FilecloudIo(SimpleHoster):
if not self.account:
self.fail(_("User not logged in"))
elif not self.account.logged_in:
- captcha_challenge, captcha_response = recaptcha.challenge(captcha_key)
- self.account.form_data = {"recaptcha_challenge_field": captcha_challenge,
- "recaptcha_response_field": captcha_response}
+ challenge, response = recaptcha.challenge(captcha_key)
+ self.account.form_data = {"recaptcha_challenge_field": challenge,
+ "recaptcha_response_field" : response}
self.account.relogin(self.user)
self.retry(2)
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index db5ea20d3..b94892ef4 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -92,36 +92,39 @@ class FilepostCom(SimpleHoster):
def getJsonResponse(self, get_dict, post_dict, field):
- json_response = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- self.logDebug(json_response)
+ res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- if not 'js' in json_response:
+ self.logDebug(res)
+
+ if not 'js' in res:
self.error(_("JSON %s 1") % field)
- # i changed js_answer to json_response['js'] since js_answer is nowhere set.
+ # i changed js_answer to res['js'] since js_answer is nowhere set.
# i don't know the JSON-HTTP specs in detail, but the previous author
- # accessed json_response['js']['error'] as well as js_answer['error'].
+ # accessed res['js']['error'] as well as js_answer['error'].
# see the two lines commented out with "# ~?".
- if 'error' in json_response['js']:
- if json_response['js']['error'] == 'download_delay':
- self.retry(wait_time=json_response['js']['params']['next_download'])
+ if 'error' in res['js']:
+
+ if res['js']['error'] == 'download_delay':
+ self.retry(wait_time=res['js']['params']['next_download'])
# ~? self.retry(wait_time=js_answer['params']['next_download'])
- elif 'Wrong file password' in json_response['js']['error']:
- return None
- elif 'You entered a wrong CAPTCHA code' in json_response['js']['error']:
- return None
- elif 'CAPTCHA Code nicht korrekt' in json_response['js']['error']:
+
+ elif ('Wrong file password' in res['js']['error']
+ or 'You entered a wrong CAPTCHA code' in res['js']['error']
+ or 'CAPTCHA Code nicht korrekt' in res['js']['error']):
return None
- elif 'CAPTCHA' in json_response['js']['error']:
+
+ elif 'CAPTCHA' in res['js']['error']:
self.logDebug("Error response is unknown, but mentions CAPTCHA")
return None
+
else:
- self.fail(json_response['js']['error'])
+ self.fail(res['js']['error'])
- if not 'answer' in json_response['js'] or not field in json_response['js']['answer']:
+ if not 'answer' in res['js'] or not field in res['js']['answer']:
self.error(_("JSON %s 2") % field)
- return json_response['js']['answer'][field]
+ return res['js']['answer'][field]
getInfo = create_getInfo(FilepostCom)
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index c943a076d..5dd72efe7 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -15,7 +15,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+'
@@ -25,8 +25,6 @@ class FilerNet(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- CONTENT_DISPOSITION = True
-
INFO_PATTERN = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>[\w^_]+)</small></h1>'
OFFLINE_PATTERN = r'Nicht gefunden'
@@ -66,16 +64,17 @@ class FilerNet(SimpleHoster):
if 'location' in header and header['location']:
self.correctCaptcha()
- self.link = urljoin('http://filer.net', header['location'])
+ self.link = header['location']
return
else:
self.invalidCaptcha()
- def handlePremium(self):
- super(FilerNet, self).handlePremium()
- if self.link:
- self.link = urljoin("http://filer.net/", self.link)
+ def downloadLink(self, link):
+ if not link:
+ return
+
+ self.download(urljoin("http://filer.net/", link), disposition=True)
getInfo = create_getInfo(FilerNet)
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 2266e49b0..871a3dd26 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -59,9 +59,9 @@ class FileserveCom(Hoster):
def setup(self):
self.resumeDownload = self.multiDL = self.premium
-
self.file_id = re.match(self.__pattern__, self.pyfile.url).group('id')
- self.url = "%s%s" % (self.URLS[0], self.file_id)
+ self.url = "%s%s" % (self.URLS[0], self.file_id)
+
self.logDebug("File ID: %s URL: %s" % (self.file_id, self.url))
@@ -159,10 +159,10 @@ class FileserveCom(Hoster):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
- challenge, code = recaptcha.challenge(captcha_key)
+ challenge, response = recaptcha.challenge(captcha_key)
res = json_loads(self.load(self.URLS[2],
- post={'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field': code,
+ post={'recaptcha_challenge_field' : challenge,
+ 'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.file_id}))
if not res['success']:
self.invalidCaptcha()
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
index d86ee6157..4197a2858 100644
--- a/module/plugins/hoster/FilezyNet.py
+++ b/module/plugins/hoster/FilezyNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilezyNet(DeadHoster):
__name__ = "FilezyNet"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py
index aa2c3993f..361537927 100644
--- a/module/plugins/hoster/FlyFilesNet.py
+++ b/module/plugins/hoster/FlyFilesNet.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class FlyFilesNet(SimpleHoster):
__name__ = "FlyFilesNet"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?flyfiles\.net/.*'
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 84a56419b..a27dc04b8 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -17,8 +17,8 @@ class FreeWayMe(Hoster):
def setup(self):
self.resumeDownload = False
- self.chunkLimit = 1
- self.multiDL = self.premium
+ self.multiDL = self.premium
+ self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py
index 8c0df84b2..e56d1a299 100644
--- a/module/plugins/hoster/FreevideoCz.py
+++ b/module/plugins/hoster/FreevideoCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FreevideoCz(DeadHoster):
__name__ = "FreevideoCz"
__type__ = "hoster"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+'
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index 919d40891..c68866f87 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -25,8 +25,9 @@ class GamefrontCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def process(self, pyfile):
diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py
index 854e348c8..436d825a9 100644
--- a/module/plugins/hoster/GooIm.py
+++ b/module/plugins/hoster/GooIm.py
@@ -25,7 +25,8 @@ class GooIm(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py
index b7e37457d..2dae4cd80 100644
--- a/module/plugins/hoster/IfileIt.py
+++ b/module/plugins/hoster/IfileIt.py
@@ -27,27 +27,30 @@ class IfileIt(SimpleHoster):
def handleFree(self):
- ukey = re.match(self.__pattern__, self.pyfile.url).group(1)
- json_url = 'http://ifile.it/new_download-request.json'
+ ukey = re.match(self.__pattern__, self.pyfile.url).group(1)
+ json_url = 'http://ifile.it/new_download-request.json'
post_data = {"ukey": ukey, "ab": "0"}
+ res = json_loads(self.load(json_url, post=post_data))
- json_response = json_loads(self.load(json_url, post=post_data))
- self.logDebug(json_response)
- if json_response['status'] == 3:
+ self.logDebug(res)
+
+ if res['status'] == 3:
self.offline()
- if json_response['captcha']:
+ if res['captcha']:
captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1)
recaptcha = ReCaptcha(self)
post_data['ctype'] = "recaptcha"
for _i in xrange(5):
- post_data['recaptcha_challenge'], post_data['recaptcha_response'] = recaptcha.challenge(captcha_key)
- json_response = json_loads(self.load(json_url, post=post_data))
- self.logDebug(json_response)
+ challenge, response = recaptcha.challenge(captcha_key)
+ post_data.update({'recaptcha_challenge': challenge,
+ 'recaptcha_response' : response})
+ res = json_loads(self.load(json_url, post=post_data))
+ self.logDebug(res)
- if json_response['retry']:
+ if res['retry']:
self.invalidCaptcha()
else:
self.correctCaptcha()
@@ -55,10 +58,10 @@ class IfileIt(SimpleHoster):
else:
self.fail(_("Incorrect captcha"))
- if not "ticket_url" in json_response:
+ if not "ticket_url" in res:
self.error(_("No download URL"))
- self.download(json_response['ticket_url'])
+ self.download(res['ticket_url'])
getInfo = create_getInfo(IfileIt)
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index d566ec0e2..2df639ac1 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -23,7 +23,8 @@ class JumbofilesCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/Keep2shareCc.py b/module/plugins/hoster/Keep2shareCc.py
index cb5e65a29..d98fa3c09 100644
--- a/module/plugins/hoster/Keep2shareCc.py
+++ b/module/plugins/hoster/Keep2shareCc.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, cr
class Keep2shareCc(SimpleHoster):
__name__ = "Keep2shareCc"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
@@ -23,8 +23,6 @@ class Keep2shareCc(SimpleHoster):
URL_REPLACEMENTS = [(__pattern__ + ".*", "http://k2s.cc/file/\g<ID>")]
- CONTENT_DISPOSITION = True
-
NAME_PATTERN = r'File: <span>(?P<N>.+)</span>'
SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>'
@@ -87,13 +85,7 @@ class Keep2shareCc(SimpleHoster):
if m is None:
self.error(_("LINK_FREE_PATTERN not found"))
- self.link = self._getDownloadLink(m.group(1))
-
-
- def handlePremium(self):
- super(Keep2shareCc, self).handlePremium()
- if self.link:
- self.link = self._getDownloadLink(self.link)
+ self.link = m.group(1)
def handleCaptcha(self):
@@ -125,11 +117,16 @@ class Keep2shareCc(SimpleHoster):
self.fail(_("All captcha attempts failed"))
- def _getDownloadLink(self, url):
- p = urlparse(self.pyfile.url)
+ def downloadLink(self, link):
+ if not link:
+ return
+
+ p = urlparse(self.pyfile.url)
base = "%s://%s" % (p.scheme, p.netloc)
- link = _isDirectLink(self, url, self.premium)
- return urljoin(base, link) if link else ""
+ link = _isDirectLink(self, link, self.premium)
+
+ if link:
+ self.download(urljoin(base, link), disposition=True)
getInfo = create_getInfo(Keep2shareCc)
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 202ab4a77..13cbf4781 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -30,23 +30,23 @@ class KingfilesNet(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
# Click the free user button
- post_data = {'op': "download1",
- 'usr_login': "",
- 'id': self.info['pattern']['ID'],
- 'fname': self.pyfile.name,
- 'referer': "",
+ post_data = {'op' : "download1",
+ 'usr_login' : "",
+ 'id' : self.info['pattern']['ID'],
+ 'fname' : self.pyfile.name,
+ 'referer' : "",
'method_free': "+"}
self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True)
solvemedia = SolveMedia(self)
- captcha_challenge, captcha_response = solvemedia.challenge()
+ challenge, response = solvemedia.challenge()
# Make the downloadlink appear and load the file
m = re.search(self.RAND_ID_PATTERN, self.html)
@@ -56,15 +56,15 @@ class KingfilesNet(SimpleHoster):
rand = m.group(1)
self.logDebug("rand = ", rand)
- post_data = {'op': "download2",
- 'id': self.info['pattern']['ID'],
- 'rand': rand,
- 'referer': self.pyfile.url,
- 'method_free': "+",
- 'method_premium': "",
- 'adcopy_response': captcha_response,
- 'adcopy_challenge': captcha_challenge,
- 'down_direct': "1"}
+ post_data = {'op' : "download2",
+ 'id' : self.info['pattern']['ID'],
+ 'rand' : rand,
+ 'referer' : self.pyfile.url,
+ 'method_free' : "+",
+ 'method_premium' : "",
+ 'adcopy_response' : response,
+ 'adcopy_challenge': challenge,
+ 'down_direct' : "1"}
self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True)
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index 4e55496c6..0a5b26410 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -58,9 +58,12 @@ class LoadTo(SimpleHoster):
if captcha_key is None:
self.download(download_url)
else:
- captcha_challenge, captcha_response = solvemedia.challenge(captcha_key)
- self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response})
+ challenge, response = solvemedia.challenge(captcha_key)
+
+ self.download(download_url, post={"adcopy_challenge": challenge, "adcopy_response": response})
+
check = self.checkDownload({'404': re.compile("\A<h1>404 Not Found</h1>"), 'html': re.compile("html")})
+
if check == "404":
self.invalidCaptcha()
self.retry()
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 3ed1199f6..cdfa410a9 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -117,6 +117,8 @@ class MediafireCom(SimpleHoster):
def checkCaptcha(self):
solvemedia = SolveMedia(self)
- captcha_challenge, captcha_response = solvemedia.challenge()
- self.html = self.load(self.url, post={"adcopy_challenge": captcha_challenge,
- "adcopy_response": captcha_response}, decode=True)
+ challenge, response = solvemedia.challenge()
+ self.html = self.load(self.url,
+ post={'adcopy_challenge': challenge,
+ 'adcopy_response' : response},
+ decode=True)
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
index 2129fbfc8..385295d42 100644
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -14,6 +14,34 @@ from pycurl import SSL_CIPHER_LIST
from module.common.json_layer import json_loads, json_dumps
from module.plugins.Hoster import Hoster
+############################ General errors ###################################
+# EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred
+# EARGS (-2): You have passed invalid arguments to this command
+# EAGAIN (-3): (always at the request level) A temporary congestion or server malfunction prevented your request from being processed. No data was altered. Retry. Retries must be spaced with exponential backoff
+# ERATELIMIT (-4): You have exceeded your command weight per time quota. Please wait a few seconds, then try again (this should never happen in sane real-life applications)
+#
+############################ Upload errors ####################################
+# EFAILED (-5): The upload failed. Please restart it from scratch
+# ETOOMANY (-6): Too many concurrent IP addresses are accessing this upload target URL
+# ERANGE (-7): The upload file packet is out of range or not starting and ending on a chunk boundary
+# EEXPIRED (-8): The upload target URL you are trying to access has expired. Please request a fresh one
+#
+############################ Stream/System errors #############################
+# ENOENT (-9): Object (typically, node or user) not found
+# ECIRCULAR (-10): Circular linkage attempted
+# EACCESS (-11): Access violation (e.g., trying to write to a read-only share)
+# EEXIST (-12): Trying to create an object that already exists
+# EINCOMPLETE (-13): Trying to access an incomplete resource
+# EKEY (-14): A decryption operation failed (never returned by the API)
+# ESID (-15): Invalid or expired user session, please relogin
+# EBLOCKED (-16): User blocked
+# EOVERQUOTA (-17): Request over quota
+# ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later
+# ETOOMANYCONNECTIONS (-19): Too many connections on this resource
+# EWRITE (-20): Write failed
+# EREAD (-21): Read failed
+# EAPPKEY (-22): Invalid application key; request not processed
+
class MegaCoNz(Hoster):
__name__ = "MegaCoNz"
@@ -26,8 +54,7 @@ class MegaCoNz(Hoster):
__license__ = "GPLv3"
__authors__ = [("RaNaN", "ranan@pyload.org")]
-
- API_URL = "https://g.api.mega.co.nz/cs?id=%d"
+ API_URL = "https://g.api.mega.co.nz/cs"
FILE_SUFFIX = ".crypted"
@@ -48,7 +75,7 @@ class MegaCoNz(Hoster):
# generate a session id, no idea where to obtain elsewhere
uid = random.randint(10 << 9, 10 ** 10)
- res = self.load(self.API_URL % uid, post=json_dumps([kwargs]))
+ res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs]))
self.logDebug("Api Response: " + res)
return json_loads(res)
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py
index 4d1e1bcb7..f63a7b3c6 100644
--- a/module/plugins/hoster/MegaDebridEu.py
+++ b/module/plugins/hoster/MegaDebridEu.py
@@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster
class MegaDebridEu(Hoster):
__name__ = "MegaDebridEu"
__type__ = "hoster"
- __version__ = "0.4"
+ __version__ = "0.40"
__pattern__ = r'^https?://(?:w{3}\d+\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[^/]+/.+$'
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 6b1472dd8..9d8441c6f 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -36,7 +36,7 @@ class MegasharesCom(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handlePremium(self):
@@ -55,15 +55,18 @@ class MegasharesCom(SimpleHoster):
for _i in xrange(5):
random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1)
- verifyinput = self.decryptCaptcha(
- "http://d01.megashares.com/index.php?secgfx=gfx&random_num=%s" % random_num)
+ verifyinput = self.decryptCaptcha("http://d01.megashares.com/index.php",
+ get={'secgfx': "gfx", 'random_num': random_num})
+
self.logInfo(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput))
- url = ("http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri +
- "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) +
- "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)))
- self.logDebug(url)
- res = self.load(url)
+ res = self.load("http://d01.megashares.com%s" % request_uri,
+ get={'rs' : "check_passport_renewal",
+ 'rsargs[]': verifyinput,
+ 'rsargs[]': random_num,
+ 'rsargs[]': passport_num,
+ 'rsargs[]': "replace_sec_pprenewal",
+ 'rsrnd[]' : str(int(time() * 1000))})
if 'Thank you for reactivating your passport.' in res:
self.correctCaptcha()
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index 10628149f..fc866e2b1 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+).*'
@@ -19,10 +19,13 @@ class MultishareCz(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
- OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>'
SIZE_REPLACEMENTS = [('&nbsp;', '')]
+ MULTI_HOSTER = True
+
+ INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
+ OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>'
+
def process(self, pyfile):
msurl = re.match(self.__pattern__, pyfile.url)
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py
index d4a85c8c0..8af4a9a61 100644
--- a/module/plugins/hoster/MyvideoDe.py
+++ b/module/plugins/hoster/MyvideoDe.py
@@ -9,7 +9,7 @@ from module.unescape import unescape
class MyvideoDe(Hoster):
__name__ = "MyvideoDe"
__type__ = "hoster"
- __version__ = "0.9"
+ __version__ = "0.90"
__pattern__ = r'http://(?:www\.)?myvideo\.de/watch/'
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index b866b51c5..f5c5ee802 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
def getInfo(urls):
## returns list of tupels (name, size (in bytes), status (see FileDatabase), url)
- apiurl = "http://api.netload.in/info.php?auth=Zf9SnQh9WiReEsb18akjvQGqT0I830e8&bz=1&md5=1&file_id="
+ apiurl = "http://api.netload.in/info.php"
id_regex = re.compile(NetloadIn.__pattern__)
urls_per_query = 80
@@ -25,7 +25,12 @@ def getInfo(urls):
if match:
ids = ids + match.group(1) + ";"
- api = getURL(apiurl + ids, decode=True)
+ api = getURL(apiurl,
+ get={'auth' : "Zf9SnQh9WiReEsb18akjvQGqT0I830e8",
+ 'bz' : 1,
+ 'md5' : 1,
+ 'file_id': ids},
+ decode=True)
if api is None or len(api) < 10:
self.logDebug("Prefetch failed")
@@ -91,7 +96,7 @@ class NetloadIn(Hoster):
if self.premium:
self.logDebug("Use Premium Account")
- settings = self.load("http://www.netload.in/index.php?id=2&lang=en")
+ settings = self.load("http://www.netload.in/index.php", get={'id': 2, 'lang': "en"})
if '<option value="2" selected="selected">Direkter Download' in settings:
self.logDebug("Using direct download")
diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadSx.py
index 287026460..d2ae08954 100644
--- a/module/plugins/hoster/NowDownloadEu.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -6,14 +6,14 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.utils import fixup
-class NowDownloadEu(SimpleHoster):
- __name__ = "NowDownloadEu"
+class NowDownloadSx(SimpleHoster):
+ __name__ = "NowDownloadSx"
__type__ = "hoster"
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+'
- __description__ = """NowDownload.at hoster plugin"""
+ __description__ = """NowDownload.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("godofdream", "soilfiction@gmail.com"),
("Walter Purcaro", "vuolter@gmail.com")]
@@ -25,14 +25,15 @@ class NowDownloadEu(SimpleHoster):
TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"'
CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"'
WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),'
- LINK_PATTERN = r'"(http://f\d+\.nowdownload\.at/dl/\w+/\w+)'
+ LINK_PATTERN = r'(http://s\d+\.coolcdn\.info/nowdownload/.+?)["\']'
NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')]
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
@@ -60,4 +61,4 @@ class NowDownloadEu(SimpleHoster):
self.download(str(url.group(1)))
-getInfo = create_getInfo(NowDownloadEu)
+getInfo = create_getInfo(NowDownloadSx)
diff --git a/module/plugins/hoster/NowVideoAt.py b/module/plugins/hoster/NowVideoSx.py
index 3d9b706d3..b59bd79da 100644
--- a/module/plugins/hoster/NowVideoAt.py
+++ b/module/plugins/hoster/NowVideoSx.py
@@ -5,14 +5,14 @@ import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-class NowVideoAt(SimpleHoster):
- __name__ = "NowVideoAt"
+class NowVideoSx(SimpleHoster):
+ __name__ = "NowVideoSx"
__type__ = "hoster"
__version__ = "0.07"
__pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P<ID>\w+)'
- __description__ = """NowVideo.at hoster plugin"""
+ __description__ = """NowVideo.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
@@ -27,8 +27,8 @@ class NowVideoAt(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
@@ -41,4 +41,4 @@ class NowVideoAt(SimpleHoster):
self.download(m.group(1))
-getInfo = create_getInfo(NowVideoAt)
+getInfo = create_getInfo(NowVideoSx)
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index a2a0840c3..588d8f64a 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -13,7 +13,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})'
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 977d45b6f..346317271 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -34,7 +34,7 @@ class OneFichierCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index a6f415043..71342f3e0 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class PornhostCom(Hoster):
__name__ = "PornhostCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?pornhost\.com/(\d+/\d+\.html|\d+)'
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index d1b84771f..1bb787f09 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class PornhubCom(Hoster):
__name__ = "PornhubCom"
__type__ = "hoster"
- __version__ = "0.5"
+ __version__ = "0.50"
__pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+'
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index b4fe327db..9f8037d41 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -41,9 +41,11 @@ class PremiumTo(Hoster):
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(
- "http://premium.to/api/getfile.php?username=%s&password=%s&link=%s" % (self.account.username, self.account.password, quote(pyfile.url, "")),
- disposition=True)
+ self.download("http://premium.to/api/getfile.php",
+ get={'username': self.account.username,
+ 'password': self.account.password,
+ 'link' : quote(pyfile.url, "")},
+ disposition=True)
check = self.checkDownload({"nopremium": "No premium account available"})
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index 70abdfcc2..bf00325d9 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -36,10 +36,11 @@ class PremiumizeMe(Hoster):
(user, data) = self.account.selectAccount()
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- answer = self.load(
- "https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (
- user, data['password'], pyfile.url))
- data = json_loads(answer)
+ data = json_loads(self.load("https://api.premiumize.me/pm-api/v1.php",
+ get={'method' : "directdownloadlink",
+ 'params[login]': user,
+ 'params[pass]' : data['password'],
+ 'params[link]' : pyfile.url}))
# Check status and decide what to do
status = data['status']
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py
index c1e536d39..c4c16cf3c 100644
--- a/module/plugins/hoster/RPNetBiz.py
+++ b/module/plugins/hoster/RPNetBiz.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class RPNetBiz(Hoster):
__name__ = "RPNetBiz"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """RPNet.biz hoster plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 6f3f7950a..cc11fa7c7 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -55,7 +55,7 @@ class RapidgatorNet(SimpleHoster):
self.premium = True
self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
+ self.chunkLimit = 1
def api_response(self, cmd):
@@ -129,13 +129,11 @@ class RapidgatorNet(SimpleHoster):
break
else:
captcha, captcha_key = self.getCaptcha()
- captcha_challenge, captcha_response = captcha.challenge(captcha_key)
+ challenge, response = captcha.challenge(captcha_key)
- self.html = self.load(url, post={
- "DownloadCaptchaForm[captcha]": "",
- "adcopy_challenge": captcha_challenge,
- "adcopy_response": captcha_response
- })
+ self.html = self.load(url, post={'DownloadCaptchaForm[captcha]': "",
+ 'adcopy_challenge' : challenge,
+ 'adcopy_response' : response})
if "The verification code is incorrect" in self.html:
self.invalidCaptcha()
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
deleted file mode 100644
index 4ec5af67a..000000000
--- a/module/plugins/hoster/RapidshareCom.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from module.network.RequestFactory import getURL
-from module.plugins.Hoster import Hoster
-
-
-def getInfo(urls):
- ids = ""
- names = ""
-
- p = re.compile(RapidshareCom.__pattern__)
-
- for url in urls:
- r = p.search(url)
- if r.group("name"):
- ids += "," + r.group("id")
- names += "," + r.group("name")
- elif r.group("name_new"):
- ids += "," + r.group("id_new")
- names += "," + r.group("name_new")
-
- url = "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles&files=%s&filenames=%s" % (ids[1:], names[1:])
-
- api = getURL(url)
- result = []
- i = 0
- for res in api.split():
- tmp = res.split(",")
- if tmp[4] in ("0", "4", "5"):
- status = 1
- elif tmp[4] == "1":
- status = 2
- else:
- status = 3
-
- result.append((tmp[1], tmp[2], status, urls[i]))
- i += 1
-
- yield result
-
-
-class RapidshareCom(Hoster):
- __name__ = "RapidshareCom"
- __type__ = "hoster"
- __version__ = "1.40"
-
- __pattern__ = r'https?://(?:www\.)?rapidshare\.com/(?:files/(?P<id>\d+)/(?P<name>[^?]+)|#!download\|(?:\w+)\|(?P<id_new>\d+)\|(?P<name_new>[^|]+))'
-
- __description__ = """Rapidshare.com hoster plugin"""
- __license__ = "GPLv3"
- __authors__ = [("spoob", "spoob@pyload.org"),
- ("RaNaN", "ranan@pyload.org"),
- ("mkaay", "mkaay@mkaay.de")]
-
-
- def setup(self):
- self.no_download = True
- self.api_data = None
- self.offset = 0
- self.dl_dict = {}
-
- self.id = None
- self.name = None
-
- self.chunkLimit = -1 if self.premium else 1
- self.multiDL = self.resumeDownload = self.premium
-
-
- def process(self, pyfile):
- self.url = pyfile.url
- self.prepare()
-
-
- def prepare(self):
- m = re.match(self.__pattern__, self.url)
-
- if m.group("name"):
- self.id = m.group("id")
- self.name = m.group("name")
- else:
- self.id = m.group("id_new")
- self.name = m.group("name_new")
-
- self.download_api_data()
- if self.api_data['status'] == "1":
- self.pyfile.name = self.get_file_name()
-
- if self.premium:
- self.handlePremium()
- else:
- self.handleFree()
-
- elif self.api_data['status'] == "2":
- self.logInfo(_("Rapidshare: Traffic Share (direct download)"))
- self.pyfile.name = self.get_file_name()
-
- self.download(self.pyfile.url, get={"directstart": 1})
-
- elif self.api_data['status'] in ("0", "4", "5"):
- self.offline()
- elif self.api_data['status'] == "3":
- self.tempOffline()
- else:
- self.error(_("Unknown response code"))
-
-
- def handleFree(self):
- while self.no_download:
- self.dl_dict = self.freeWait()
-
- #tmp = "#!download|%(server)s|%(id)s|%(name)s|%(size)s"
- download = "http://%(host)s/cgi-bin/rsapi.cgi?sub=download&editparentlocation=0&bin=1&fileid=%(id)s&filename=%(name)s&dlauth=%(auth)s" % self.dl_dict
-
- self.logDebug("RS API Request: %s" % download)
- self.download(download, ref=False)
-
- check = self.checkDownload({"ip": "You need RapidPro to download more files from your IP address",
- "auth": "Download auth invalid"})
- if check == "ip":
- self.setWait(60)
- self.logInfo(_("Already downloading from this ip address, waiting 60 seconds"))
- self.wait()
- self.handleFree()
- elif check == "auth":
- self.logInfo(_("Invalid Auth Code, download will be restarted"))
- self.offset += 5
- self.handleFree()
-
-
- def handlePremium(self):
- info = self.account.getAccountInfo(self.user, True)
- self.logDebug("Use Premium Account")
- url = self.api_data['mirror']
- self.download(url, get={"directstart": 1})
-
-
- def download_api_data(self, force=False):
- """
- http://images.rapidshare.com/apidoc.txt
- """
- if self.api_data and not force:
- return
- api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_file = {"sub": "checkfiles", "incmd5": "1", "files": self.id, "filenames": self.name}
- html = self.load(api_url_base, cookies=False, get=api_param_file).strip()
- self.logDebug("RS INFO API: %s" % html)
- if html.startswith("ERROR"):
- return
- fields = html.split(",")
-
- # status codes:
- # 0=File not found
- # 1=File OK (Anonymous downloading)
- # 3=Server down
- # 4=File marked as illegal
- # 5=Anonymous file locked, because it has more than 10 downloads already
- # 50+n=File OK (TrafficShare direct download type "n" without any logging.)
- # 100+n=File OK (TrafficShare direct download type "n" with logging.
- # Read our privacy policy to see what is logged.)
-
- self.api_data = {"fileid": fields[0], "filename": fields[1], "size": int(fields[2]), "serverid": fields[3],
- "status": fields[4], "shorthost": fields[5], "checksum": fields[6].strip().lower()}
-
- if int(self.api_data['status']) > 100:
- self.api_data['status'] = str(int(self.api_data['status']) - 100)
- elif int(self.api_data['status']) > 50:
- self.api_data['status'] = str(int(self.api_data['status']) - 50)
-
- self.api_data['mirror'] = "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data
-
-
- def freeWait(self):
- """downloads html with the important information
- """
- self.no_download = True
-
- id = self.id
- name = self.name
-
- prepare = "https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=%(id)s&filename=%(name)s&try=1&cbf=RSAPIDispatcher&cbid=1" % {
- "name": name, "id": id}
-
- self.logDebug("RS API Request: %s" % prepare)
- result = self.load(prepare, ref=False)
- self.logDebug("RS API Result: %s" % result)
-
- between_wait = re.search("You need to wait (\d+) seconds", result)
-
- if "You need RapidPro to download more files from your IP address" in result:
- self.setWait(60)
- self.logInfo(_("Already downloading from this ip address, waiting 60 seconds"))
- self.wait()
- elif ("Too many users downloading from this server right now" in result or
- "All free download slots are full" in result):
- self.setWait(120)
- self.logInfo(_("RapidShareCom: No free slots"))
- self.wait()
- elif "This file is too big to download it for free" in result:
- self.fail(_("You need a premium account for this file"))
- elif "Filename invalid." in result:
- self.fail(_("Filename reported invalid"))
- elif between_wait:
- self.setWait(int(between_wait.group(1)), True)
- self.wait()
- else:
- self.no_download = False
-
- tmp, info = result.split(":")
- data = info.split(",")
-
- dl_dict = {"id": id,
- "name": name,
- "host": data[0],
- "auth": data[1],
- "server": self.api_data['serverid'],
- "size": self.api_data['size']}
- self.setWait(int(data[2]) + 2 + self.offset)
- self.wait()
-
- return dl_dict
-
-
- def get_file_name(self):
- if self.api_data['filename']:
- return self.api_data['filename']
- return self.url.split("/")[-1]
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index e14b18a4f..a3b2cffcd 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -57,12 +57,12 @@ class RapiduNet(SimpleHoster):
recaptcha = ReCaptcha(self)
for _i in xrange(10):
- challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY)
+ challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha",
{'_go' : None,
'captcha1': challenge,
- 'captcha2': code,
+ 'captcha2': response,
'fileId' : self.info['ID']})
if jsvars['message'] == 'success':
self.download(jsvars['url'])
@@ -70,13 +70,13 @@ class RapiduNet(SimpleHoster):
def getJsonResponse(self, url, post_data):
- response = self.load(url, post=post_data, decode=True)
- if not response.startswith('{'):
+ res = self.load(url, post=post_data, decode=True)
+ if not res.startswith('{'):
self.retry()
- self.logDebug(url, response)
+ self.logDebug(url, res)
- return json_loads(response)
+ return json_loads(res)
getInfo = create_getInfo(RapiduNet)
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index db19a9217..cc6dd49c3 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -52,10 +52,11 @@ class RealdebridCom(Hoster):
else:
password = password[0]
- url = "https://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % (
- quote(pyfile.url, ""), password, int(time() * 1000))
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
+ get={'lang' : "en",
+ 'link' : quote(pyfile.url, ""),
+ 'password': password,
+ 'time' : int(time() * 1000)}))
self.logDebug("Returned Data: %s" % data)
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index 5bf624273..d68fbe262 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -9,7 +9,7 @@ from module.unescape import unescape
class RedtubeCom(Hoster):
__name__ = "RedtubeCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?redtube\.com/\d+'
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 07755cb9c..7cde01025 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -35,9 +35,10 @@ class RehostTo(Hoster):
long_ses = data['long_ses']
self.logDebug("Rehost.to: Old URL: %s" % pyfile.url)
- new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, ""))
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(new_url, disposition=True)
+ self.download("http://rehost.to/process_download.php",
+ get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")},
+ disposition=True)
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py
index 982e18eda..aa4830563 100644
--- a/module/plugins/hoster/RgHostNet.py
+++ b/module/plugins/hoster/RgHostNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RgHostNet(SimpleHoster):
__name__ = "RgHostNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?'
@@ -17,17 +17,10 @@ class RgHostNet(SimpleHoster):
__authors__ = [("z00nx", "z00nx0@gmail.com")]
- INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>'
+ INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>'
OFFLINE_PATTERN = r'File is deleted|this page is not found'
- LINK_PATTERN = r'''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'''
-
- def handleFree(self):
- m = re.search(self.LINK_PATTERN, self.html)
- if m is None:
- self.error(_("LINK_PATTERN not found"))
- download_link = m.group(1)
- self.download(download_link, disposition=True)
+ LINK_FREE_PATTERN = r'<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'
getInfo = create_getInfo(RgHostNet)
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 17330c5f9..bc37f45c8 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -34,7 +34,7 @@ class SimplyPremiumCom(Hoster):
else:
self.logDebug("Old URL: %s" % pyfile.url)
for i in xrange(5):
- page = self.load('http://www.simply-premium.com/premium.php?info&link=' + pyfile.url)
+ page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': pyfile.url})
self.logDebug("JSON data: " + page)
if page != '':
break
diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py
index ac7d7ef9a..0fe4ae0f8 100644
--- a/module/plugins/hoster/SimplydebridCom.py
+++ b/module/plugins/hoster/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class SimplydebridCom(Hoster):
__name__ = "SimplydebridCom"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*'
@@ -18,8 +18,9 @@ class SimplydebridCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):
@@ -46,7 +47,7 @@ class SimplydebridCom(Hoster):
self.logDebug("New URL: %s" % new_url)
if not re.match(self.__pattern__, new_url):
- page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
+ page = self.load("http://simply-debrid.com/api.php", get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page):
self.fail(_("Unable to unrestrict link"))
new_url = page
diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py
index 71cfb6b27..79c8a2f1e 100644
--- a/module/plugins/hoster/SoundcloudCom.py
+++ b/module/plugins/hoster/SoundcloudCom.py
@@ -9,7 +9,7 @@ from module.plugins.Hoster import Hoster
class SoundcloudCom(Hoster):
__name__ = "SoundcloudCom"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P<UID>.*?)/(?P<SID>.*)'
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index 05f2bdee7..6813271d0 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -23,7 +23,7 @@ def getInfo(urls):
class StreamCz(Hoster):
__name__ = "StreamCz"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+.*'
@@ -39,8 +39,8 @@ class StreamCz(Hoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 8c80455b4..f1f8cd90a 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -19,7 +19,7 @@ class TusfilesNet(XFSHoster):
HOSTER_DOMAIN = "tusfiles.net"
INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)\['
- OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!'
+ OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!|The file you are trying to download is no longer available'
def setup(self):
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index 5fed652cb..59a8ce6e1 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -25,7 +25,8 @@ class TwoSharedCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 294bd8e17..262b37c21 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -41,7 +41,7 @@ class UlozTo(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index adfa2eb1f..94ce1b845 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -80,7 +80,7 @@ class UnrestrictLi(Hoster):
self.download(new_url, disposition=True)
if self.getConfig("history"):
- self.load("https://unrestrict.li/history/&delete=all")
+ self.load("https://unrestrict.li/history/", get={'delete': "all"})
self.logInfo(_("Download history deleted"))
diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py
index 77b3d7d8a..3dd796900 100644
--- a/module/plugins/hoster/UploadableCh.py
+++ b/module/plugins/hoster/UploadableCh.py
@@ -53,13 +53,13 @@ class UploadableCh(SimpleHoster):
recaptcha = ReCaptcha(self)
- challenge, captcha = recaptcha.challenge(self.RECAPTCHA_KEY)
+ challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
# Submit the captcha solution
self.load("http://www.uploadable.ch/checkReCaptcha.php",
cookies=True,
post={'recaptcha_challenge_field' : challenge,
- 'recaptcha_response_field' : captcha,
+ 'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.info['ID']},
decode=True)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 40fe768e9..833468a80 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -113,7 +113,7 @@ class UploadedTo(Hoster):
def setup(self):
- self.multiDL = self.resumeDownload = self.premium
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1 # critical problems with more chunks
self.fileID = getID(self.pyfile.url)
@@ -206,8 +206,8 @@ class UploadedTo(Hoster):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
- challenge, result = recaptcha.challenge()
- options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result}
+ challenge, response = recaptcha.challenge()
+ options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response}
self.wait()
result = self.load(url, post=options)
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index 239cc92f5..25c424f1f 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -52,9 +52,9 @@ class UpstoreNet(SimpleHoster):
self.wait(wait_time)
# then, handle the captcha
- challenge, code = recaptcha.challenge()
- post_data['recaptcha_challenge_field'] = challenge
- post_data['recaptcha_response_field'] = code
+ challenge, response = recaptcha.challenge()
+ post_data.update({'recaptcha_challenge_field': challenge,
+ 'recaptcha_response_field' : response})
self.html = self.load(self.pyfile.url, post=post_data, decode=True)
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index 8f434203d..6dbac397b 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -27,8 +27,9 @@ class VeohCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py
index 025abf15e..9e4abf702 100644
--- a/module/plugins/hoster/VimeoCom.py
+++ b/module/plugins/hoster/VimeoCom.py
@@ -29,8 +29,9 @@ class VimeoCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py
index 7499294ed..340a3feaa 100644
--- a/module/plugins/hoster/Vipleech4uCom.py
+++ b/module/plugins/hoster/Vipleech4uCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Vipleech4uCom(DeadHoster):
__name__ = "Vipleech4uCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php'
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py
index f70493d04..d9190805d 100644
--- a/module/plugins/hoster/XVideosCom.py
+++ b/module/plugins/hoster/XVideosCom.py
@@ -10,7 +10,7 @@ from module.plugins.Hoster import Hoster
class XVideosCom(Hoster):
__name__ = "XVideos.com"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)/.*'
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 5eb431ec8..4bb2520e6 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+'
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 565aa63f0..bb0737440 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -16,11 +16,11 @@ def which(program):
Courtesy of http://stackoverflow.com/a/377028/675646"""
-
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
+
if fpath:
if is_exe(program):
return program
@@ -60,31 +60,32 @@ class YoutubeCom(Hoster):
invalidChars = u'\u2605:?><"|\\'
# name, width, height, quality ranking, 3D
- formats = {5: (".flv", 400, 240, 1, False),
- 6: (".flv", 640, 400, 4, False),
- 17: (".3gp", 176, 144, 0, False),
- 18: (".mp4", 480, 360, 2, False),
- 22: (".mp4", 1280, 720, 8, False),
- 43: (".webm", 640, 360, 3, False),
- 34: (".flv", 640, 360, 4, False),
- 35: (".flv", 854, 480, 6, False),
- 36: (".3gp", 400, 240, 1, False),
- 37: (".mp4", 1920, 1080, 9, False),
- 38: (".mp4", 4096, 3072, 10, False),
- 44: (".webm", 854, 480, 5, False),
- 45: (".webm", 1280, 720, 7, False),
- 46: (".webm", 1920, 1080, 9, False),
- 82: (".mp4", 640, 360, 3, True),
- 83: (".mp4", 400, 240, 1, True),
- 84: (".mp4", 1280, 720, 8, True),
- 85: (".mp4", 1920, 1080, 9, True),
- 100: (".webm", 640, 360, 3, True),
- 101: (".webm", 640, 360, 4, True),
- 102: (".webm", 1280, 720, 8, True)}
+ formats = {5 : (".flv" , 400 , 240 , 1 , False),
+ 6 : (".flv" , 640 , 400 , 4 , False),
+ 17 : (".3gp" , 176 , 144 , 0 , False),
+ 18 : (".mp4" , 480 , 360 , 2 , False),
+ 22 : (".mp4" , 1280, 720 , 8 , False),
+ 43 : (".webm", 640 , 360 , 3 , False),
+ 34 : (".flv" , 640 , 360 , 4 , False),
+ 35 : (".flv" , 854 , 480 , 6 , False),
+ 36 : (".3gp" , 400 , 240 , 1 , False),
+ 37 : (".mp4" , 1920, 1080, 9 , False),
+ 38 : (".mp4" , 4096, 3072, 10, False),
+ 44 : (".webm", 854 , 480 , 5 , False),
+ 45 : (".webm", 1280, 720 , 7 , False),
+ 46 : (".webm", 1920, 1080, 9 , False),
+ 82 : (".mp4" , 640 , 360 , 3 , True ),
+ 83 : (".mp4" , 400 , 240 , 1 , True ),
+ 84 : (".mp4" , 1280, 720 , 8 , True ),
+ 85 : (".mp4" , 1920, 1080, 9 , True ),
+ 100: (".webm", 640 , 360 , 3 , True ),
+ 101: (".webm", 640 , 360 , 4 , True ),
+ 102: (".webm", 1280, 720 , 8 , True )}
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 04a395e1e..8d3de5b26 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.8"
+ __version__ = "0.80"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index 61470f903..fa2f6edb3 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -16,8 +16,9 @@ class ZeveraCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/internal/AbstractExtractor.py b/module/plugins/internal/AbstractExtractor.py
index 8a69ebb56..2317ad689 100644
--- a/module/plugins/internal/AbstractExtractor.py
+++ b/module/plugins/internal/AbstractExtractor.py
@@ -14,7 +14,7 @@ class WrongPassword(Exception):
class AbtractExtractor:
__name__ = "AbtractExtractor"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Abtract extractor plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 7009e6986..965799e8e 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -4,10 +4,12 @@ import re
from random import random
+from module.common.json_layer import json_loads
+
class CaptchaService:
__name__ = "CaptchaService"
- __version__ = "0.15"
+ __version__ = "0.16"
__description__ = """Base captcha service plugin"""
__license__ = "GPLv3"
@@ -34,7 +36,7 @@ class CaptchaService:
m = re.search(self.KEY_PATTERN, html)
if m:
- self.key = m.group("KEY")
+ self.key = m.group(1).strip()
self.plugin.logDebug("%s key: %s" % (self.__name__, self.key))
return self.key
else:
@@ -59,8 +61,8 @@ class ReCaptcha(CaptchaService):
__authors__ = [("pyLoad Team", "admin@pyload.org")]
- KEY_PATTERN = r'recaptcha(/api|\.net)/(challenge|noscript)\?k=(?P<KEY>[\w-]+)'
- KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P<KEY>[\w-]+)'
+ KEY_PATTERN = r'recaptcha(?:/api|\.net)/(?:challenge|noscript)\?k=([\w-]+)'
+ KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\']([\w-]+)'
def detect_key(self, html=None):
@@ -74,7 +76,7 @@ class ReCaptcha(CaptchaService):
m = re.search(self.KEY_PATTERN, html) or re.search(self.KEY_AJAX_PATTERN, html)
if m:
- self.key = m.group("KEY")
+ self.key = m.group(1).strip()
self.plugin.logDebug("ReCaptcha key: %s" % self.key)
return self.key
else:
@@ -91,36 +93,43 @@ class ReCaptcha(CaptchaService):
self.plugin.fail(errmsg)
raise TypeError(errmsg)
- js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key})
+ html = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={'k': key})
try:
- challenge = re.search("challenge : '(.+?)',", js).group(1)
- server = re.search("server : '(.+?)',", js).group(1)
+ challenge = re.search("challenge : '(.+?)',", html).group(1)
+ server = re.search("server : '(.+?)',", html).group(1)
except:
- self.plugin.error("ReCaptcha challenge pattern not found")
-
- result = self.result(server, challenge)
+ errmsg = _("ReCaptcha challenge pattern not found")
+ self.plugin.fail(errmsg)
+ raise ValueError(errmsg)
- self.plugin.logDebug("ReCaptcha result: %s" % result, "challenge: %s" % challenge)
+ self.plugin.logDebug("ReCaptcha challenge: %s" % challenge)
- return challenge, result
+ return challenge, self.result(server, challenge)
def result(self, server, challenge):
- return self.plugin.decryptCaptcha("%simage" % server, get={'c': challenge},
- cookies=True, forceUser=True, imgtype="jpg")
+ result = self.plugin.decryptCaptcha("%simage" % server,
+ get={'c': challenge},
+ cookies=True,
+ forceUser=True,
+ imgtype="jpg")
+
+ self.plugin.logDebug("ReCaptcha result: %s" % result)
+
+ return result
class AdsCaptcha(CaptchaService):
__name__ = "AdsCaptcha"
- __version__ = "0.05"
+ __version__ = "0.06"
__description__ = """AdsCaptcha captcha service plugin"""
__license__ = "GPLv3"
__authors__ = [("pyLoad Team", "admin@pyload.org")]
- ID_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(?P<ID>\d+)'
- KEY_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*PublicKey=(?P<KEY>[\w-]+)'
+ CAPTCHAID_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*CaptchaId=(\d+)'
+ PUBLICKEY_PATTERN = r'api\.adscaptcha\.com/Get\.aspx\?[^"\']*PublicKey=([\w-]+)'
def detect_key(self, html=None):
@@ -132,18 +141,18 @@ class AdsCaptcha(CaptchaService):
self.plugin.fail(errmsg)
raise TypeError(errmsg)
- m = re.search(self.ID_PATTERN, html)
- n = re.search(self.KEY_PATTERN, html)
+ m = re.search(self.PUBLICKEY_PATTERN, html)
+ n = re.search(self.CAPTCHAID_PATTERN, html)
if m and n:
- self.key = (m.group("ID"), m.group("KEY"))
- self.plugin.logDebug("AdsCaptcha id|key: %s | %s" % self.key)
+ self.key = (m.group(1).strip(), n.group(1).strip()) #: key is the tuple(PublicKey, CaptchaId)
+ self.plugin.logDebug("AdsCaptcha key|id: %s | %s" % self.key)
return self.key
else:
- self.plugin.logDebug("AdsCaptcha id or key not found")
+ self.plugin.logDebug("AdsCaptcha key or id not found")
return None
- def challenge(self, key=None): #: key is a tuple(CaptchaId, PublicKey)
+ def challenge(self, key=None):
if not key:
if self.detect_key():
key = self.key
@@ -152,25 +161,31 @@ class AdsCaptcha(CaptchaService):
self.plugin.fail(errmsg)
raise TypeError(errmsg)
- CaptchaId, PublicKey = key
+ PublicKey, CaptchaId = key
- js = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey})
+ html = self.plugin.req.load("http://api.adscaptcha.com/Get.aspx", get={'CaptchaId': CaptchaId, 'PublicKey': PublicKey})
try:
- challenge = re.search("challenge: '(.+?)',", js).group(1)
- server = re.search("server: '(.+?)',", js).group(1)
+ challenge = re.search("challenge: '(.+?)',", html).group(1)
+ server = re.search("server: '(.+?)',", html).group(1)
except:
- self.plugin.error("AdsCaptcha challenge pattern not found")
-
- result = self.result(server, challenge)
+ errmsg = _("AdsCaptcha challenge pattern not found")
+ self.plugin.fail(errmsg)
+ raise ValueError(errmsg)
- self.plugin.logDebug("AdsCaptcha result: %s" % result, "challenge: %s" % challenge)
+ self.plugin.logDebug("AdsCaptcha challenge: %s" % challenge)
- return challenge, result
+ return challenge, self.result(server, challenge)
def result(self, server, challenge):
- return self.plugin.decryptCaptcha("%sChallenge.aspx" % server, get={'cid': challenge, 'dummy': random()},
- cookies=True, imgtype="jpg")
+ result = self.plugin.decryptCaptcha("%sChallenge.aspx" % server,
+ get={'cid': challenge, 'dummy': random()},
+ cookies=True,
+ imgtype="jpg")
+
+ self.plugin.logDebug("AdsCaptcha result: %s" % result)
+
+ return result
class SolveMedia(CaptchaService):
@@ -182,7 +197,7 @@ class SolveMedia(CaptchaService):
__authors__ = [("pyLoad Team", "admin@pyload.org")]
- KEY_PATTERN = r'api\.solvemedia\.com/papi/challenge\.(no)?script\?k=(?P<KEY>.+?)["\']'
+ KEY_PATTERN = r'api\.solvemedia\.com/papi/challenge\.(?:no)?script\?k=(.+?)["\']'
def challenge(self, key=None):
@@ -198,16 +213,120 @@ class SolveMedia(CaptchaService):
try:
challenge = re.search(r'<input type=hidden name="adcopy_challenge" id="adcopy_challenge" value="([^"]+)">',
html).group(1)
- server = "http://api.solvemedia.com/papi/media"
+ server = "http://api.solvemedia.com/papi/media"
except:
- self.plugin.error("SolveMedia challenge pattern not found")
+ errmsg = _("SolveMedia challenge pattern not found")
+ self.plugin.fail(errmsg)
+ raise ValueError(errmsg)
+
+ self.plugin.logDebug("SolveMedia challenge: %s" % challenge)
+
+ return challenge, self.result(server, challenge)
+
+
+ def result(self, server, challenge):
+ result = self.plugin.decryptCaptcha(server, get={'c': challenge}, imgtype="gif")
+
+ self.plugin.logDebug("SolveMedia result: %s" % result)
+
+ return result
+
+
+class AdYouLike(CaptchaService):
+ __name__ = "AdYouLike"
+ __version__ = "0.02"
+
+ __description__ = """AdYouLike captcha service plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ AYL_PATTERN = r'Adyoulike\.create\s*\((.+?)\)'
+ CALLBACK_PATTERN = r'(Adyoulike\.g\._jsonp_\d+)'
+
+
+ def detect_key(self, html=None):
+ if not html:
+ if hasattr(self.plugin, "html") and self.plugin.html:
+ html = self.plugin.html
+ else:
+ errmsg = _("AdYouLike html not found")
+ self.plugin.fail(errmsg)
+ raise TypeError(errmsg)
- result = self.result(server, challenge)
+ m = re.search(self.AYL_PATTERN, html)
+ n = re.search(self.CALLBACK_PATTERN, html)
+ if m and n:
+ self.key = (m.group(1).strip(), n.group(1).strip())
+ self.plugin.logDebug("AdYouLike ayl|callback: %s | %s" % self.key)
+ return self.key #: key is the tuple(ayl, callback)
+ else:
+ self.plugin.logDebug("AdYouLike ayl or callback not found")
+ return None
- self.plugin.logDebug("SolveMedia result: %s" % result, "challenge: %s" % challenge)
- return challenge, result
+ def challenge(self, key=None):
+ if not key:
+ if self.detect_key():
+ key = self.key
+ else:
+ errmsg = _("AdYouLike key not found")
+ self.plugin.fail(errmsg)
+ raise TypeError(errmsg)
+
+ ayl, callback = key
+
+ # {"adyoulike":{"key":"P~zQ~O0zV0WTiAzC-iw0navWQpCLoYEP"},
+ # "all":{"element_id":"ayl_private_cap_92300","lang":"fr","env":"prod"}}
+ ayl = json_loads(ayl)
+
+ html = self.plugin.req.load("http://api-ayl.appspot.com/challenge",
+ get={'key' : ayl['adyoulike']['key'],
+ 'env' : ayl['all']['env'],
+ 'callback': callback})
+ try:
+ challenge = json_loads(re.search(callback + r'\s*\((.+?)\)', html).group(1))
+ except:
+ errmsg = _("AdYouLike challenge pattern not found")
+ self.plugin.fail(errmsg)
+ raise ValueError(errmsg)
+
+ self.plugin.logDebug("AdYouLike challenge: %s" % challenge)
+
+ return self.result(ayl, challenge)
def result(self, server, challenge):
- return self.plugin.decryptCaptcha(server, get={'c': challenge}, imgtype="gif")
+ # Adyoulike.g._jsonp_5579316662423138
+ # ({"translations":{"fr":{"instructions_visual":"Recopiez « Soonnight » ci-dessous :"}},
+ # "site_under":true,"clickable":true,"pixels":{"VIDEO_050":[],"DISPLAY":[],"VIDEO_000":[],"VIDEO_100":[],
+ # "VIDEO_025":[],"VIDEO_075":[]},"medium_type":"image/adyoulike",
+ # "iframes":{"big":"<iframe src=\"http://www.soonnight.com/campagn.html\" scrolling=\"no\"
+ # height=\"250\" width=\"300\" frameborder=\"0\"></iframe>"},"shares":{},"id":256,
+ # "token":"e6QuI4aRSnbIZJg02IsV6cp4JQ9~MjA1","formats":{"small":{"y":300,"x":0,"w":300,"h":60},
+ # "big":{"y":0,"x":0,"w":300,"h":250},"hover":{"y":440,"x":0,"w":300,"h":60}},
+ # "tid":"SqwuAdxT1EZoi4B5q0T63LN2AkiCJBg5"})
+
+ if isinstance(server, basestring):
+ server = json_loads(server)
+
+ if isinstance(challenge, basestring):
+ challenge = json_loads(challenge)
+
+ try:
+ instructions_visual = challenge['translations'][server['all']['lang']]['instructions_visual']
+ result = re.search(u'«(.+?)»', instructions_visual).group(1).strip()
+ except:
+ errmsg = _("AdYouLike result not found")
+ self.plugin.fail(errmsg)
+ raise ValueError(errmsg)
+
+ result = {'_ayl_captcha_engine' : "adyoulike",
+ '_ayl_env' : server['all']['env'],
+ '_ayl_tid' : challenge['tid'],
+ '_ayl_token_challenge': challenge['token'],
+ '_ayl_response' : response}
+
+ self.plugin.logDebug("AdYouLike result: %s" % result)
+
+ return result
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index c86f9b286..6ec2e4b82 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,25 +9,28 @@ from module.utils import remove_chars
class MultiHoster(Hook):
__name__ = "MultiHoster"
__type__ = "hook"
- __version__ = "0.19"
+ __version__ = "0.20"
__description__ = """Generic MultiHoster plugin"""
__license__ = "GPLv3"
__authors__ = [("pyLoad Team", "admin@pyload.org")]
- interval = 24 * 60 * 60 #: reload hosters daily
+ interval = 12 * 60 * 60 #: reload hosters every 12h
- HOSTER_REPLACEMENTS = [("2shared.com", "twoshared.com"), ("4shared.com", "fourshared.com"), ("cloudnator.com", "shragle.com"),
- ("ifile.it", "filecloud.io"), ("easy-share.com", "crocko.com"), ("freakshare.net", "freakshare.com"),
- ("hellshare.com", "hellshare.cz"), ("share-rapid.cz", "sharerapid.com"), ("sharerapid.cz", "sharerapid.com"),
- ("ul.to", "uploaded.to"), ("uploaded.net", "uploaded.to"), ("1fichier.com", "onefichier.com")]
+ HOSTER_REPLACEMENTS = [("1fichier.com", "onefichier.com"), ("2shared.com", "twoshared.com"),
+ ("4shared.com", "fourshared.com"), ("cloudnator.com", "shragle.com"),
+ ("easy-share.com", "crocko.com"), ("freakshare.net", "freakshare.com"),
+ ("hellshare.com", "hellshare.cz"), ("ifile.it", "filecloud.io"),
+ ("putlocker.com", "firedrive.com"), ("share-rapid.cz", "multishare.cz"),
+ ("sharerapid.cz", "multishare.cz"), ("ul.to", "uploaded.to"),
+ ("uploaded.net", "uploaded.to")]
HOSTER_EXCLUDED = []
def setup(self):
- self.hosters = []
- self.supported = []
+ self.hosters = []
+ self.supported = []
self.new_supported = []
@@ -41,7 +44,6 @@ class MultiHoster(Hook):
def getHosterCached(self):
if not self.hosters:
-
try:
hosterSet = self.toHosterSet(self.getHoster()) - set(self.HOSTER_EXCLUDED)
except Exception, e:
@@ -110,8 +112,10 @@ class MultiHoster(Hook):
"""reload hoster list periodically"""
self.logInfo(_("Reloading supported hoster list"))
- old_supported = self.supported
- self.supported, self.new_supported, self.hosters = [], [], []
+ old_supported = self.supported
+ self.supported = []
+ self.new_supported = []
+ self.hosters = []
self.overridePlugins()
@@ -123,11 +127,8 @@ class MultiHoster(Hook):
def overridePlugins(self):
- pluginMap = {}
- for name in self.core.pluginManager.hosterPlugins.keys():
- pluginMap[name.lower()] = name
-
- accountList = [name.lower() for name, data in self.core.accountManager.accounts.iteritems() if data]
+ pluginMap = dict((name.lower(), name) for name in self.core.pluginManager.hosterPlugins.keys())
+ accountList = [name.lower() for name, data in self.core.accountManager.accounts.iteritems() if data]
excludedList = []
for hoster in self.getHosterCached():
@@ -146,14 +147,14 @@ class MultiHoster(Hook):
return
module = self.core.pluginManager.getPlugin(self.__name__)
- klass = getattr(module, self.__name__)
+ klass = getattr(module, self.__name__)
# inject plugin plugin
self.logDebug("Overwritten Hosters", ", ".join(sorted(self.supported)))
for hoster in self.supported:
dict = self.core.pluginManager.hosterPlugins[hoster]
dict['new_module'] = module
- dict['new_name'] = self.__name__
+ dict['new_name'] = self.__name__
if excludedList:
self.logInfo(_("The following hosters were not overwritten - account exists"), ", ".join(sorted(excludedList)))
@@ -162,7 +163,7 @@ class MultiHoster(Hook):
self.logDebug("New Hosters", ", ".join(sorted(self.new_supported)))
# create new regexp
- regexp = r'.*(%s).*' % "|".join([x.replace(".", "\\.") for x in self.new_supported])
+ regexp = r'.*(%s).*' % "|".join([x.replace(".", "\.") for x in self.new_supported])
if hasattr(klass, "__pattern__") and isinstance(klass.__pattern__, basestring) and '://' in klass.__pattern__:
regexp = r'%s|%s' % (klass.__pattern__, regexp)
@@ -170,7 +171,7 @@ class MultiHoster(Hook):
dict = self.core.pluginManager.hosterPlugins[self.__name__]
dict['pattern'] = regexp
- dict['re'] = re.compile(regexp)
+ dict['re'] = re.compile(regexp)
def unloadHoster(self, hoster):
@@ -190,9 +191,9 @@ class MultiHoster(Hook):
# reset pattern
klass = getattr(self.core.pluginManager.getPlugin(self.__name__), self.__name__)
- dict = self.core.pluginManager.hosterPlugins[self.__name__]
+ dict = self.core.pluginManager.hosterPlugins[self.__name__]
dict['pattern'] = getattr(klass, "__pattern__", r'^unmatchable$')
- dict['re'] = re.compile(dict['pattern'])
+ dict['re'] = re.compile(dict['pattern'])
def downloadFailed(self, pyfile):
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index f391445fd..ddaea020a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -104,9 +104,9 @@ def parseFileInfo(plugin, url="", html=""):
#@TODO: Remove in 0.4.10
-#@NOTE: Every plugin must have own parseInfo classmethod to work with 0.4.10
+#@NOTE: Every plugin must have own parseInfos classmethod to work with 0.4.10
def create_getInfo(plugin):
- return lambda urls: [(info['name'], info['size'], info['status'], info['url']) for info in plugin.parseInfo(urls)]
+ return lambda urls: [(info['name'], info['size'], info['status'], info['url']) for info in plugin.parseInfos(urls)]
def timestamp():
@@ -144,7 +144,7 @@ def _isDirectLink(self, url, resumable=True):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.70"
+ __version__ = "0.72"
__pattern__ = r'^unmatchable$'
@@ -206,11 +206,10 @@ class SimpleHoster(Hoster):
FORCE_CHECK_TRAFFIC = False #: Set to True to force checking traffic left for premium account
CHECK_DIRECT_LINK = None #: Set to True to check for direct link, set to None to do it only if self.account is True
MULTI_HOSTER = False #: Set to True to leech other hoster link (according its multihoster hook if available)
- CONTENT_DISPOSITION = False #: Set to True to replace file name with content-disposition value from http header
@classmethod
- def parseInfo(cls, urls):
+ def parseInfos(cls, urls):
for url in urls:
url = replace_patterns(url, cls.FILE_URL_REPLACEMENTS if hasattr(cls, "FILE_URL_REPLACEMENTS") else cls.URL_REPLACEMENTS) #@TODO: Remove FILE_URL_REPLACEMENTS check in 0.4.10
yield cls.getInfo(url)
@@ -319,8 +318,8 @@ class SimpleHoster(Hoster):
set_cookies(self.req.cj, self.COOKIES)
if (self.MULTI_HOSTER
- and self.__pattern__ != self.core.pluginManager.hosterPlugins[self.__name__]['pattern']
- and re.match(self.__pattern__, self.pyfile.url) is None):
+ and (self.__pattern__ != self.core.pluginManager.hosterPlugins[self.__name__]['pattern']
+ or re.match(self.__pattern__, self.pyfile.url) is None)):
self.logInfo("Multi hoster detected")
@@ -384,12 +383,17 @@ class SimpleHoster(Hoster):
self.logDebug("Handled as free download")
self.handleFree()
- if self.link:
- self.download(self.link, disposition=self.CONTENT_DISPOSITION)
-
+ self.downloadLink(self.link)
self.checkFile()
+ def downloadLink(self, link):
+ if not link:
+ return
+
+ self.download(link, disposition=True)
+
+
def checkFile(self):
if self.checkDownload({'empty': re.compile(r"^$")}) is "empty": #@TODO: Move to hoster in 0.4.10
self.fail(_("Empty file"))
diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py
index e754141a1..053946dbe 100644
--- a/module/plugins/internal/UnZip.py
+++ b/module/plugins/internal/UnZip.py
@@ -8,7 +8,7 @@ from module.plugins.internal.AbstractExtractor import AbtractExtractor
class UnZip(AbtractExtractor):
__name__ = "UnZip"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """Zip extractor plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/internal/XFSCrypter.py b/module/plugins/internal/XFSCrypter.py
index 62fd8c017..4b57dab90 100644
--- a/module/plugins/internal/XFSCrypter.py
+++ b/module/plugins/internal/XFSCrypter.py
@@ -1,12 +1,12 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class XFSCrypter(SimpleCrypter):
__name__ = "XFSCrypter"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'^unmatchable$'