diff options
-rw-r--r-- | module/plugins/hoster/CzshareCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/EuroshareEu.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FastshareCz.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FilefactoryCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/PremiumTo.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/SimplydebridCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/SmoozedCom.py | 14 | ||||
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/UploadableCh.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/ZeveraCom.py | 12 |
11 files changed, 36 insertions, 44 deletions
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 8f72f2148..befd964bf 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "0.99" + __version__ = "1.00" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -134,7 +134,7 @@ class CzshareCom(SimpleHoster): self.wait() - def checkFile(self, rules={}): + def checkFile(self): # check download check = self.checkDownload({ "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), @@ -156,7 +156,7 @@ class CzshareCom(SimpleHoster): self.invalidCaptcha() self.retry() - return super(CzshareCom, self).checkFile(rules) + return super(CzshareCom, self).checkFile() getInfo = create_getInfo(CzshareCom) diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 842e0cb87..857faebc5 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" - __version__ = "0.28" + __version__ = "0.29" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -58,11 +58,11 @@ class EuroshareEu(SimpleHoster): self.link = "http://euroshare.eu%s" % m.group(1) - def checkFile(self, rules={}): + def checkFile(self): if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)}) self.longWait(5 * 60, 12) - return super(EuroshareEu, self).checkFile(rules) + return super(EuroshareEu, self).checkFile() getInfo = create_getInfo(EuroshareEu) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 330a6e3b9..e56a05d37 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -58,7 +58,7 @@ class FastshareCz(SimpleHoster): self.download(urlparse.urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18}) - def checkFile(self, rules={}): + def checkFile(self): check = self.checkDownload({ 'paralell-dl' : re.compile(r"<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)"), 'wrong captcha': re.compile(r'Download for FREE'), @@ -74,7 +74,7 @@ class FastshareCz(SimpleHoster): elif check == "credit": self.resetAccount() - return super(FastshareCz, self).checkFile(rules) + return super(FastshareCz, self).checkFile() getInfo = create_getInfo(FastshareCz) diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index ea1a38b7a..3aa9dc2a9 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -20,7 +20,7 @@ def getInfo(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -59,7 +59,7 @@ class FilefactoryCom(SimpleHoster): self.wait(m.group(1)) - def checkFile(self, rules={}): + def checkFile(self): check = self.checkDownload({'multiple': "You are currently downloading too many files at once.", 'error' : '<div id="errorMessage">'}) @@ -70,7 +70,7 @@ class FilefactoryCom(SimpleHoster): elif check == "error": self.error(_("Unknown error")) - return super(FilefactoryCom, self).checkFile(rules) + return super(FilefactoryCom, self).checkFile() def handlePremium(self, pyfile): diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index ab5016673..cf0dffbfe 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -11,7 +11,7 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -35,7 +35,7 @@ class PremiumTo(MultiHoster): disposition=True) - def checkFile(self, rules={}): + def checkFile(self): if self.checkDownload({'nopremium': "No premium account available"}): self.retry(60, 5 * 60, "No premium account available") @@ -50,7 +50,7 @@ class PremiumTo(MultiHoster): if err: self.fail(err) - return super(PremiumTo, self).checkFile(rules) + return super(PremiumTo, self).checkFile() getInfo = create_getInfo(PremiumTo) diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 64a490993..98f338d78 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): __name__ = "ShareonlineBiz" __type__ = "hoster" - __version__ = "0.51" + __version__ = "0.52" __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -107,7 +107,7 @@ class ShareonlineBiz(SimpleHoster): self.wait() - def checkFile(self, rules={}): + def checkFile(self): check = self.checkDownload({'cookie': re.compile(r'<div id="dl_failure"'), 'fail' : re.compile(r"<title>Share-Online")}) @@ -119,7 +119,7 @@ class ShareonlineBiz(SimpleHoster): self.invalidCaptcha() self.retry(5, 5 * 60, _("Download failed")) - return super(ShareonlineBiz, self).checkFile(rules) + return super(ShareonlineBiz, self).checkFile() def handlePremium(self, pyfile): #: should be working better loading (account) api internally diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index aae71d983..1728ae130 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, rep class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -39,11 +39,11 @@ class SimplydebridCom(MultiHoster): self.wait(5) - def checkFile(self, rules={}): + def checkFile(self): if self.checkDownload({"error": "No address associated with hostname"}): self.retry(24, 3 * 60, _("Bad file downloaded")) - return super(SimplydebridCom, self).checkFile(rules) + return super(SimplydebridCom, self).checkFile() getInfo = create_getInfo(SimplydebridCom) diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 9ae12f145..5413fb7cb 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -17,6 +17,10 @@ class SmoozedCom(MultiHoster): __authors__ = [("", "")] + FILE_ERRORS = [("Error", r'{"state":"error"}'), + ("Retry", r'{"state":"retry"}')] + + def handleFree(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) @@ -54,11 +58,3 @@ class SmoozedCom(MultiHoster): self.fail(_("Unable to initialize download")) else: self.link = header["location"][-1] if isinstance(header["location"], list) else header["location"] - - - def checkFile(self, rules={}): - if self.checkDownload({'error': '{"state":"error"}', - 'retry': '{"state":"retry"}'}): - self.fail(_("Error response received")) - - return super(SmoozedCom, self).checkFile(rules) diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index b43ff8d92..2edc929ea 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -15,7 +15,7 @@ def convertDecimalPrefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.09" + __version__ = "1.10" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -119,7 +119,7 @@ class UlozTo(SimpleHoster): return super(UlozTo, self).checkErrors() - def checkFile(self, rules={}): + def checkFile(self): check = self.checkDownload({ "wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'), "offline" : re.compile(self.OFFLINE_PATTERN), @@ -147,7 +147,7 @@ class UlozTo(SimpleHoster): elif check == "not_found": self.fail(_("Server error, file not downloadable")) - return super(UlozTo, self).checkFile(rules) + return super(UlozTo, self).checkFile() getInfo = create_getInfo(UlozTo) diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py index f323a3538..283359927 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/UploadableCh.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadableCh(SimpleHoster): __name__ = "UploadableCh" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -65,13 +65,13 @@ class UploadableCh(SimpleHoster): self.download(pyfile.url, post={'download': "normal"}, disposition=True) - def checkFile(self, rules={}): + def checkFile(self): if self.checkDownload({'wait': re.compile("Please wait for")}): self.logInfo("Downloadlimit reached, please wait or reconnect") self.wait(60 * 60, True) self.retry() - return super(UploadableCh, self).checkFile(rules) + return super(UploadableCh, self).checkFile() getInfo = create_getInfo(UploadableCh) diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index 617e00e58..976aef67f 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -20,15 +20,11 @@ class ZeveraCom(MultiHoster): ("Walter Purcaro", "vuolter@gmail.com")] - def handlePremium(self, pyfile): - self.link = "https://%s/getFiles.ashx?ourl=%s" % (self.account.HOSTER_DOMAIN, pyfile.url) - + FILE_ERRORS = [("Error", r'action="ErrorDownload.aspx')] - def checkFile(self, rules={}): - if self.checkDownload({"error": 'action="ErrorDownload.aspx'}): - self.fail(_("Error response received")) - return super(ZeveraCom, self).checkFile(rules) + def handlePremium(self, pyfile): + self.link = "https://%s/getFiles.ashx?ourl=%s" % (self.account.HOSTER_DOMAIN, pyfile.url) getInfo = create_getInfo(ZeveraCom) |