diff options
Diffstat (limited to 'module/plugins/hoster')
218 files changed, 593 insertions, 1166 deletions
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 6cc5a8824..6ba2cb4e7 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -3,14 +3,14 @@ import re import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json, parse_size +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json, parse_size class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.50" + __version__ = "0.51" __status__ = "testing" __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' @@ -49,6 +49,3 @@ class AlldebridCom(MultiHoster): pyfile.name = data['filename'] pyfile.size = parse_size(data['filesize']) self.link = data['link'] - - -getInfo = create_getInfo(AlldebridCom) diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py index be10e122a..c54d03efc 100644 --- a/module/plugins/hoster/AndroidfilehostCom.py +++ b/module/plugins/hoster/AndroidfilehostCom.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class AndroidfilehostCom(SimpleHoster): __name__ = "AndroidfilehostCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?androidfilehost\.com/\?fid=\d+' @@ -28,7 +28,7 @@ class AndroidfilehostCom(SimpleHoster): NAME_PATTERN = r'<br />(?P<N>.*?)</h1>' SIZE_PATTERN = r'<h4>size</h4>\s*<p>(?P<S>[\d.,]+)(?P<U>[\w^_]+)</p>' - HASHSUM_PATTERN = r'<h4>(?P<T>.*?)</h4>\s*<p><code>(?P<H>.*?)</code></p>' + HASHSUM_PATTERN = r'<h4>(?P<H>.*?)</h4>\s*<p><code>(?P<D>.*?)</code></p>' OFFLINE_PATTERN = r'404 not found' @@ -62,6 +62,3 @@ class AndroidfilehostCom(SimpleHoster): get={'fid' : fid, 'w' : 'download', 'mirror': mirror_host}) - - -getInfo = create_getInfo(AndroidfilehostCom) diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 9c71c70a9..606c4ec0b 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.hoster.Http import Http, create_getInfo +from module.plugins.hoster.Http import Http class BasePlugin(Http): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.50" + __version__ = "0.51" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -23,6 +23,3 @@ class BasePlugin(Http): if not self.pyfile.url.startswith("http"): self.fail(_("No plugin matched")) - - -getInfo = create_getInfo(BasePlugin) diff --git a/module/plugins/hoster/BasketbuildCom.py b/module/plugins/hoster/BasketbuildCom.py index 329a4715a..9ef40baf6 100644 --- a/module/plugins/hoster/BasketbuildCom.py +++ b/module/plugins/hoster/BasketbuildCom.py @@ -6,13 +6,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class BasketbuildCom(SimpleHoster): __name__ = "BasketbuildCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:\w\.)?basketbuild\.com/filedl/.+' @@ -62,6 +62,3 @@ class BasketbuildCom(SimpleHoster): except AttributeError: self.error(_("DL-Link not found")) - - -getInfo = create_getInfo(BasketbuildCom) diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 63ca0de96..75b348917 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class BayfilesCom(DeadHoster): __name__ = "BayfilesCom" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P<ID>\w+/\w+/[^/]+)' @@ -15,6 +15,3 @@ class BayfilesCom(DeadHoster): __description__ = """Bayfiles.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - -getInfo = create_getInfo(BayfilesCom) diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 8e75d2510..51082a8a1 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" - __version__ = "0.32" + __version__ = "0.33" __status__ = "testing" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' @@ -78,6 +78,3 @@ class BezvadataCz(SimpleHoster): self.temp_offline() else: return super(BezvadataCz, self).check_errors() - - -getInfo = create_getInfo(BezvadataCz) diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py index 23b27f06e..54984676a 100644 --- a/module/plugins/hoster/BillionuploadsCom.py +++ b/module/plugins/hoster/BillionuploadsCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class BillionuploadsCom(DeadHoster): __name__ = "BillionuploadsCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "stable" __pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}' @@ -15,6 +15,3 @@ class BillionuploadsCom(DeadHoster): __description__ = """Billionuploads.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(BillionuploadsCom) diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index b90f69759..9562e0724 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -5,13 +5,13 @@ from __future__ import with_statement import re from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class BitshareCom(SimpleHoster): __name__ = "BitshareCom" __type__ = "hoster" - __version__ = "0.58" + __version__ = "0.59" __status__ = "testing" __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P<ID>\w+)(?(1)/(?P<NAME>.+?)\.html)' @@ -79,7 +79,7 @@ class BitshareCom(SimpleHoster): #: This may either download our file or forward us to an error page self.link = self.get_download_url() - if self.check_file({'error': ">Error occured<"}): + if self.scan_download({'error': ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") @@ -114,9 +114,9 @@ class BitshareCom(SimpleHoster): self.retry() #: Resolve captcha - if captcha == 1: + if captcha is 1: self.log_debug("File is captcha protected") - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge() res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", @@ -159,6 +159,3 @@ class BitshareCom(SimpleHoster): else: self.retry_captcha() - - -getInfo = create_getInfo(BitshareCom) diff --git a/module/plugins/hoster/BoltsharingCom.py b/module/plugins/hoster/BoltsharingCom.py index 41e20d3be..520ef5e20 100644 --- a/module/plugins/hoster/BoltsharingCom.py +++ b/module/plugins/hoster/BoltsharingCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class BoltsharingCom(DeadHoster): __name__ = "BoltsharingCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?boltsharing\.com/\w{12}' @@ -15,6 +15,3 @@ class BoltsharingCom(DeadHoster): __description__ = """Boltsharing.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(BoltsharingCom) diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 794a3b60e..37b194054 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster from module.plugins.captcha.ReCaptcha import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{15,16}' @@ -42,7 +42,7 @@ class CatShareNet(SimpleHoster): def handle_free(self, pyfile): - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge() self.data = self.load(pyfile.url, @@ -52,6 +52,3 @@ class CatShareNet(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) - - -getInfo = create_getInfo(CatShareNet) diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py index ab6b0f14d..6cfb9e250 100644 --- a/module/plugins/hoster/CloudzerNet.py +++ b/module/plugins/hoster/CloudzerNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class CloudzerNet(DeadHoster): __name__ = "CloudzerNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+' @@ -17,6 +17,3 @@ class CloudzerNet(DeadHoster): __authors__ = [("gs", "I-_-I-_-I@web.de"), ("z00nx", "z00nx0@gmail.com"), ("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(CloudzerNet) diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 3c613c9e3..5fd0b3247 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)' @@ -67,6 +67,3 @@ class CloudzillaTo(SimpleHoster): def handle_premium(self, pyfile): return self.handle_free(pyfile) - - -getInfo = create_getInfo(CloudzillaTo) diff --git a/module/plugins/hoster/CramitIn.py b/module/plugins/hoster/CramitIn.py index 3b6044adf..bf94bb299 100644 --- a/module/plugins/hoster/CramitIn.py +++ b/module/plugins/hoster/CramitIn.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class CramitIn(XFSHoster): __name__ = "CramitIn" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?cramit\.in/\w{12}' @@ -25,6 +25,3 @@ class CramitIn(XFSHoster): INFO_PATTERN = r'<span class=t2>\s*(?P<N>.*?)</span>.*?<small>\s*\((?P<S>.*?)\)' LINK_PATTERN = r'href="(http://cramit\.in/file_download/.*?)"' - - -getInfo = create_getInfo(CramitIn) diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 30934cffc..59543e6c0 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -4,13 +4,13 @@ import re import urlparse from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class CrockoCom(SimpleHoster): __name__ = "CrockoCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+' @@ -56,13 +56,10 @@ class CrockoCom(SimpleHoster): action, form = m.groups() inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge() self.download(action, post=inputs) - if self.check_file({'captcha': recaptcha.KEY_AJAX_PATTERN}): + if self.scan_download({'captcha': recaptcha.KEY_AJAX_PATTERN}): self.retry_captcha() - - -getInfo = create_getInfo(CrockoCom) diff --git a/module/plugins/hoster/CyberlockerCh.py b/module/plugins/hoster/CyberlockerCh.py index 6415b45c4..8c16106e1 100644 --- a/module/plugins/hoster/CyberlockerCh.py +++ b/module/plugins/hoster/CyberlockerCh.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class CyberlockerCh(DeadHoster): __name__ = "CyberlockerCh" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+' @@ -15,6 +15,3 @@ class CyberlockerCh(DeadHoster): __description__ = """Cyberlocker.ch hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(CyberlockerCh) diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 2341f80e9..be4108c23 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -5,14 +5,14 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import parse_size +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import parse_size class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "1.07" + __version__ = "1.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' @@ -138,7 +138,7 @@ class CzshareCom(SimpleHoster): def check_download(self): #: Check download - check = self.check_file({ + check = self.scan_download({ "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), 'credit' : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), "multi-dl" : re.compile(self.MULTIDL_PATTERN), @@ -158,6 +158,3 @@ class CzshareCom(SimpleHoster): self.retry_captcha() return super(CzshareCom, self).check_download() - - -getInfo = create_getInfo(CzshareCom) diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index bf1655fe9..6c8f21766 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -3,7 +3,7 @@ import re from module.PyFile import statusMap -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster @@ -44,7 +44,7 @@ def get_info(urls): class DailymotionCom(Hoster): __name__ = "DailymotionCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)' @@ -78,7 +78,7 @@ class DailymotionCom(Hoster): def get_quality(self): - q = self.get_config('quality') + q = self.config.get('quality') if q == "Lowest": quality = 0 @@ -112,10 +112,10 @@ class DailymotionCom(Hoster): def check_info(self, pyfile): pyfile.name, pyfile.size, pyfile.status, pyfile.url = get_info([pyfile.url])[0] - if pyfile.status == 1: + if pyfile.status is 1: self.offline() - elif pyfile.status == 6: + elif pyfile.status is 6: self.temp_offline() diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 24bb1e8a5..2b85e1483 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DataHu(SimpleHoster): __name__ = "DataHu" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?data\.hu/get/\w+' @@ -35,6 +35,3 @@ class DataHu(SimpleHoster): def setup(self): self.resume_download = True self.multiDL = self.premium - - -getInfo = create_getInfo(DataHu) diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 27e8a566b..5c9756b51 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DataportCz(SimpleHoster): __name__ = "DataportCz" __type__ = "hoster" - __version__ = "0.45" + __version__ = "0.46" __status__ = "testing" __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)' @@ -44,7 +44,7 @@ class DataportCz(SimpleHoster): self.download("http://www.dataport.cz%s" % action, post=inputs) - check = self.check_file({'captcha': 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', + check = self.scan_download({'captcha': 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', 'slot' : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": self.retry_captcha() @@ -52,6 +52,3 @@ class DataportCz(SimpleHoster): elif check == "slot": self.log_debug("No free slots - wait 60s and retry") self.retry(wait=60) - - -getInfo = create_getInfo(DataportCz) diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index f63541a10..3a584f8c7 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -3,13 +3,13 @@ import re from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DateiTo(SimpleHoster): __name__ = "DateiTo" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "testing" __pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P<ID>\w+)\.html' @@ -37,7 +37,7 @@ class DateiTo(SimpleHoster): def handle_free(self, pyfile): url = 'http://datei.to/ajax/download.php' data = {'P': 'I', 'ID': self.info['pattern']['ID']} - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) for _i in xrange(3): self.log_debug("URL", url, "POST", data) @@ -72,6 +72,3 @@ class DateiTo(SimpleHoster): self.load('http://datei.to/ajax/download.php', post={'P': 'Ads'}) self.wait(wait_time, False) - - -getInfo = create_getInfo(DateiTo) diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py index 504cb3988..97a621676 100644 --- a/module/plugins/hoster/DdlstorageCom.py +++ b/module/plugins/hoster/DdlstorageCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class DdlstorageCom(DeadHoster): __name__ = "DdlstorageCom" __type__ = "hoster" - __version__ = "1.05" + __version__ = "1.06" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+' @@ -16,6 +16,3 @@ class DdlstorageCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(DdlstorageCom) diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 654fd7902..8742534a9 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __status__ = "testing" __pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' @@ -45,6 +45,3 @@ class DebridItaliaCom(MultiHoster): self.link = re.search(r'<a href="(.+?)"', self.data).group(1) except AttributeError: pass - - -getInfo = create_getInfo(DebridItaliaCom) diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 0f6e7346c..621d73151 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -4,13 +4,13 @@ import re import urllib from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DepositfilesCom(SimpleHoster): __name__ = "DepositfilesCom" __type__ = "hoster" - __version__ = "0.60" + __version__ = "0.61" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)' @@ -58,7 +58,7 @@ class DepositfilesCom(SimpleHoster): self.check_errors() - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) captcha_key = recaptcha.detect_key() if captcha_key is None: return @@ -92,6 +92,3 @@ class DepositfilesCom(SimpleHoster): elif mirror: self.link = mirror.group(1) - - -getInfo = create_getInfo(DepositfilesCom) diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 2b75ea2d8..37f9a3958 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DevhostSt(SimpleHoster): __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -28,7 +28,7 @@ class DevhostSt(SimpleHoster): NAME_PATTERN = r'<span title="(?P<N>.*?)"' SIZE_PATTERN = r'</span> \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<br' - HASHSUM_PATTERN = r'>(?P<T>.*?) Sum</span>: (?P<H>.*?)<br' + HASHSUM_PATTERN = r'>(?P<H>.*?) Sum</span>: (?P<D>.*?)<br' OFFLINE_PATTERN = r'>File Not Found' LINK_FREE_PATTERN = r'var product_download_url= \'(.+?)\'' @@ -37,6 +37,3 @@ class DevhostSt(SimpleHoster): def setup(self): self.multiDL = True self.chunk_limit = 1 - - -getInfo = create_getInfo(DevhostSt) diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index a11bfab61..b25c69c56 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(getfile\.pl\?file=/|[a-z])(?P<ID>\w+)' @@ -37,6 +37,3 @@ class DlFreeFr(SimpleHoster): self.download("http://dl.free.fr/getfile.pl", post={'file': '/' + self.info['pattern']['ID'], 'send': "Valider+et+télécharger+le+fichier"}) - - -getInfo = create_getInfo(DlFreeFr) diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py index 1b4fc0a56..8ff69af72 100644 --- a/module/plugins/hoster/DodanePl.py +++ b/module/plugins/hoster/DodanePl.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class DodanePl(DeadHoster): __name__ = "DodanePl" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "stable" __pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+' @@ -15,6 +15,3 @@ class DodanePl(DeadHoster): __description__ = """Dodane.pl hoster plugin""" __license__ = "GPLv3" __authors__ = [("z00nx", "z00nx0@gmail.com")] - - -getInfo = create_getInfo(DodanePl) diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py index 7cd7fc64d..b4a00fbd7 100644 --- a/module/plugins/hoster/DropboxCom.py +++ b/module/plugins/hoster/DropboxCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class DropboxCom(SimpleHoster): __name__ = "DropboxCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?dropbox\.com/.+' @@ -41,6 +41,3 @@ class DropboxCom(SimpleHoster): def handle_free(self, pyfile): self.download(pyfile.url, get={'dl': "1"}) - - -getInfo = create_getInfo(DropboxCom) diff --git a/module/plugins/hoster/DuploadOrg.py b/module/plugins/hoster/DuploadOrg.py index 369b5b79d..b9333413d 100644 --- a/module/plugins/hoster/DuploadOrg.py +++ b/module/plugins/hoster/DuploadOrg.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class DuploadOrg(DeadHoster): __name__ = "DuploadOrg" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?dupload\.org/\w{12}' @@ -15,6 +15,3 @@ class DuploadOrg(DeadHoster): __description__ = """Dupload.grg hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(DuploadOrg) diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index aa34ce929..f58477a40 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class EasybytezCom(XFSHoster): __name__ = "EasybytezCom" __type__ = "hoster" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __pattern__ = r'http://(?:www\.)?easybytez\.com/\w{12}' @@ -27,6 +27,3 @@ class EasybytezCom(XFSHoster): OFFLINE_PATTERN = r'>File not available' LINK_PATTERN = r'(http://(\w+\.(easybytez|easyload|ezbytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/.+?)["\'<]' - - -getInfo = create_getInfo(EasybytezCom) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index b501ccd5b..58dc0da89 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class EdiskCz(SimpleHoster): __name__ = "EdiskCz" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "testing" __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+' @@ -57,6 +57,3 @@ class EdiskCz(SimpleHoster): self.fail(_("Unexpected server response")) self.link = url - - -getInfo = create_getInfo(EdiskCz) diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index eef421ba6..79e3f00a1 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class EgoFilesCom(DeadHoster): __name__ = "EgoFilesCom" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+' @@ -15,6 +15,3 @@ class EgoFilesCom(DeadHoster): __description__ = """Egofiles.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(EgoFilesCom) diff --git a/module/plugins/hoster/EnteruploadCom.py b/module/plugins/hoster/EnteruploadCom.py index 7854128f2..657cd1198 100644 --- a/module/plugins/hoster/EnteruploadCom.py +++ b/module/plugins/hoster/EnteruploadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class EnteruploadCom(DeadHoster): __name__ = "EnteruploadCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?enterupload\.com/\w+' @@ -15,6 +15,3 @@ class EnteruploadCom(DeadHoster): __description__ = """EnterUpload.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(EnteruploadCom) diff --git a/module/plugins/hoster/EpicShareNet.py b/module/plugins/hoster/EpicShareNet.py index a5148d877..269421468 100644 --- a/module/plugins/hoster/EpicShareNet.py +++ b/module/plugins/hoster/EpicShareNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class EpicShareNet(DeadHoster): __name__ = "EpicShareNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?epicshare\.net/\w{12}' @@ -15,6 +15,3 @@ class EpicShareNet(DeadHoster): __description__ = """EpicShare.net hoster plugin""" __license__ = "GPLv3" __authors__ = [("t4skforce", "t4skforce1337[AT]gmail[DOT]com")] - - -getInfo = create_getInfo(EpicShareNet) diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index dac20bd2d..2df748cd2 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class EuroshareEu(SimpleHoster): __name__ = "EuroshareEu" __type__ = "hoster" - __version__ = "0.36" + __version__ = "0.37" __status__ = "testing" __pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+' @@ -43,7 +43,7 @@ class EuroshareEu(SimpleHoster): self.link = pyfile.url.rstrip('/') + "/download/" - check = self.check_file({ + check = self.scan_download({ 'login': re.compile(self.ERROR_PATTERN), 'json' : re.compile(r'\{"status":"error".*?"message":"(.*?)"') }) @@ -65,6 +65,3 @@ class EuroshareEu(SimpleHoster): self.error(_("LINK_FREE_PATTERN not found")) self.link = m.group(1) - - -getInfo = create_getInfo(EuroshareEu) diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py index 2314cc160..02a017b2e 100644 --- a/module/plugins/hoster/ExashareCom.py +++ b/module/plugins/hoster/ExashareCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class ExashareCom(XFSHoster): __name__ = "ExashareCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}' @@ -36,6 +36,3 @@ class ExashareCom(XFSHoster): def handle_free(self, pyfile): return super(ExashareCom, self).handle_free(pyfile) - - -getInfo = create_getInfo(ExashareCom) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index c573cca1a..10dd476ca 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -2,11 +2,11 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import seconds_to_midnight +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import seconds_to_midnight class ExtabitCom(SimpleHoster): @@ -52,7 +52,7 @@ class ExtabitCom(SimpleHoster): m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.data) if m is not None: - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) captcha_key = m.group(1) get_data = {'type': "recaptcha"} @@ -77,6 +77,3 @@ class ExtabitCom(SimpleHoster): self.error(_("LINK_FREE_PATTERN not found")) self.link = m.group(1) - - -getInfo = create_getInfo(ExtabitCom) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index f364bd441..0f0ff0ed4 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -3,14 +3,14 @@ import re import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class FastixRu(MultiHoster): __name__ = "FastixRu" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}' @@ -43,6 +43,3 @@ class FastixRu(MultiHoster): self.offline() else: self.link = data['downloadlink'] - - -getInfo = create_getInfo(FastixRu) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 493678e9b..b45e0ac23 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+' @@ -64,7 +64,7 @@ class FastshareCz(SimpleHoster): def check_download(self): - check = self.check_file({ + check = self.scan_download({ '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'), 'credit' : re.compile(self.CREDIT_ERROR) @@ -80,6 +80,3 @@ class FastshareCz(SimpleHoster): self.restart(premium=False) return super(FastshareCz, self).check_download() - - -getInfo = create_getInfo(FastshareCz) diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index 0f436c151..5ae0c42d9 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FileApeCom(DeadHoster): __name__ = "FileApeCom" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "stable" __pattern__ = r'http://(?:www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+' @@ -15,6 +15,3 @@ class FileApeCom(DeadHoster): __description__ = """FileApe.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("espes", None)] - - -getInfo = create_getInfo(FileApeCom) diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 837d1fe4a..118ab8596 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' @@ -108,6 +108,3 @@ class FileSharkPl(SimpleHoster): inputs['form[start]'] = "" self.download(link, post=inputs, disposition=True) - - -getInfo = create_getInfo(FileSharkPl) diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py index a148d6153..80c7008c6 100644 --- a/module/plugins/hoster/FileStoreTo.py +++ b/module/plugins/hoster/FileStoreTo.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FileStoreTo(SimpleHoster): __name__ = "FileStoreTo" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'http://(?:www\.)?filestore\.to/\?d=(?P<ID>\w+)' @@ -38,6 +38,3 @@ class FileStoreTo(SimpleHoster): self.wait(10) self.link = self.load("http://filestore.to/ajax/download.php", get={'D': re.search(r'"D=(\w+)', self.data).group(1)}) - - -getInfo = create_getInfo(FileStoreTo) diff --git a/module/plugins/hoster/FilebeerInfo.py b/module/plugins/hoster/FilebeerInfo.py index 083dfe2c7..76e63c019 100644 --- a/module/plugins/hoster/FilebeerInfo.py +++ b/module/plugins/hoster/FilebeerInfo.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FilebeerInfo(DeadHoster): __name__ = "FilebeerInfo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "stable" __pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P<ID>\w+)' @@ -15,6 +15,3 @@ class FilebeerInfo(DeadHoster): __description__ = """Filebeer.info plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(FilebeerInfo) diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py index 076fce1ae..87748ccab 100644 --- a/module/plugins/hoster/FileboomMe.py +++ b/module/plugins/hoster/FileboomMe.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FileboomMe(SimpleHoster): __name__ = "FileboomMe" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'https?://f(?:ile)?boom\.me/file/(?P<ID>\w+)' @@ -88,6 +88,3 @@ class FileboomMe(SimpleHoster): m = re.search(self.LINK_PATTERN, self.data) if m is not None: self.link = urlparse.urljoin(pyfile.url, m.group(0)) - - -getInfo = create_getInfo(FileboomMe) diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index 7b7ffd6ea..7f551ef0c 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -2,15 +2,15 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FilecloudIo(SimpleHoster): __name__ = "FilecloudIo" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P<ID>\w+)' @@ -57,7 +57,7 @@ class FilecloudIo(SimpleHoster): self.error(_("__AB1")) data['__ab1'] = m.group(1) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) m = re.search(self.RECAPTCHA_PATTERN, self.data) captcha_key = m.group(1) if m else recaptcha.detect_key() @@ -122,6 +122,3 @@ class FilecloudIo(SimpleHoster): self.link = rep['download_url'] else: self.fail(rep['message']) - - -getInfo = create_getInfo(FilecloudIo) diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py index c5b70fe20..a17b8ea32 100644 --- a/module/plugins/hoster/FiledropperCom.py +++ b/module/plugins/hoster/FiledropperCom.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FiledropperCom(SimpleHoster): __name__ = "FiledropperCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filedropper\.com/\w+' @@ -45,6 +45,3 @@ class FiledropperCom(SimpleHoster): if m is not None: self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), post={'code': captcha_code}) - - -getInfo = create_getInfo(FiledropperCom) diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 0cd8904e1..e8f4204af 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -3,7 +3,8 @@ import re from module.network.RequestFactory import getURL as get_url -from module.plugins.internal.SimpleHoster import SimpleHoster, parse_fileInfo +from module.plugins.internal.Base import parse_fileInfo +from module.plugins.internal.SimpleHoster import SimpleHoster def get_info(urls): @@ -21,7 +22,7 @@ def get_info(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.61" + __version__ = "0.62" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' @@ -66,7 +67,7 @@ class FilefactoryCom(SimpleHoster): def check_download(self): - check = self.check_file({ + check = self.scan_download({ 'multiple': "You are currently downloading too many files at once.", 'error' : '<div id="errorMessage">' }) diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py index 4cf444eac..cfee78fb3 100644 --- a/module/plugins/hoster/FilejungleCom.py +++ b/module/plugins/hoster/FilejungleCom.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- from module.plugins.hoster.FileserveCom import FileserveCom, check_file -from module.plugins.internal.utils import chunks +from module.plugins.internal.misc import chunks class FilejungleCom(FileserveCom): __name__ = "FilejungleCom" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __status__ = "testing" __pattern__ = r'http://(?:www\.)?filejungle\.com/f/(?P<ID>[^/]+)' diff --git a/module/plugins/hoster/FileomCom.py b/module/plugins/hoster/FileomCom.py index 0e189aac4..7419e2671 100644 --- a/module/plugins/hoster/FileomCom.py +++ b/module/plugins/hoster/FileomCom.py @@ -3,13 +3,13 @@ # Test links: # http://fileom.com/gycaytyzdw3g/random.bin.html -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class FileomCom(XFSHoster): __name__ = "FileomCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?fileom\.com/\w{12}' @@ -36,6 +36,3 @@ class FileomCom(XFSHoster): self.multiDL = True self.chunk_limit = 1 self.resume_download = self.premium - - -getInfo = create_getInfo(FileomCom) diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index abd5c4d23..963bdbac4 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -3,15 +3,15 @@ import re import time -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp\.io)/(?P<ID>[^/]+)' @@ -78,7 +78,7 @@ class FilepostCom(SimpleHoster): if not self.link: #: Solve recaptcha - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) post_dict['recaptcha_response_field'], post_dict['recaptcha_challenge_field'] = recaptcha.challenge(captcha_key) self.link = self.get_json_response(get_dict, post_dict, 'link') @@ -117,6 +117,3 @@ class FilepostCom(SimpleHoster): self.error(_("JSON %s 2") % field) return res['js']['answer'][field] - - -getInfo = create_getInfo(FilepostCom) diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py index 0e6750c91..3178c5799 100644 --- a/module/plugins/hoster/FilepupNet.py +++ b/module/plugins/hoster/FilepupNet.py @@ -6,13 +6,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FilepupNet(SimpleHoster): __name__ = "FilepupNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+' @@ -46,6 +46,3 @@ class FilepupNet(SimpleHoster): if m is not None: dl_link = m.group(1) self.download(dl_link, post={'task': "download"}) - - -getInfo = create_getInfo(FilepupNet) diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 0849a42d5..7c0b7bb5d 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -4,17 +4,16 @@ # http://filer.net/get/ivgf5ztw53et3ogd # http://filer.net/get/hgo14gzcng3scbvv -import pycurl import re from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -49,7 +48,7 @@ class FilerNet(SimpleHoster): if 'hash' not in inputs: self.error(_("Unable to detect hash")) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge() header = self.load(pyfile.url, @@ -59,6 +58,3 @@ class FilerNet(SimpleHoster): just_header=True) self.link = header.get('location') - - -getInfo = create_getInfo(FilerNet) diff --git a/module/plugins/hoster/FilerioCom.py b/module/plugins/hoster/FilerioCom.py index 9c045b168..5bfc09dfa 100644 --- a/module/plugins/hoster/FilerioCom.py +++ b/module/plugins/hoster/FilerioCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class FilerioCom(XFSHoster): __name__ = "FilerioCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(filerio\.(in|com)|filekeen\.com)/\w{12}' @@ -26,6 +26,3 @@ class FilerioCom(XFSHoster): URL_REPLACEMENTS = [(r'filekeen\.com', "filerio.in")] OFFLINE_PATTERN = r'>"File Not Found|File has been removed' - - -getInfo = create_getInfo(FilerioCom) diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 38c6290b4..68aa24149 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -4,7 +4,7 @@ import re from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import chunks +from module.plugins.internal.misc import chunks def get_info(urls): @@ -33,7 +33,7 @@ def get_info(urls): class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" - __version__ = "0.37" + __version__ = "0.38" __status__ = "testing" __pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+' @@ -101,11 +101,11 @@ class FilesMailRu(Hoster): #: then the download will be restarted. It's only bad for these #: who want download a HTML-File (it's one in a million ;-) ) # - #: The maximum UploadSize allowed on files.mail.ru at the moment == 100MB + #: The maximum UploadSize allowed on files.mail.ru at the moment is 100MB #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) - if self.check_file({'html': "<meta name="}, read_size=50000) is "html": + if self.scan_download({'html': "<meta name="}, read_size=50000) is "html": self.log_info(_("There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." % self.pyfile.name)) self.retry() diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 97041c434..c56023939 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -5,7 +5,7 @@ import re from module.network.RequestFactory import getURL as get_url from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import chunks, json, parse_size, seconds_to_midnight +from module.plugins.internal.misc import chunks, json, parse_size, seconds_to_midnight def check_file(plugin, urls): @@ -69,7 +69,7 @@ class FileserveCom(Hoster): def process(self, pyfile): pyfile.name, pyfile.size, status, self.url = check_file(self, [self.url])[0] - if status != 2: + if status is not 2: self.offline() self.log_debug("File Name: %s Size: %d" % (pyfile.name, pyfile.size)) @@ -118,7 +118,7 @@ class FileserveCom(Hoster): self.download(self.url, post={'download': "normal"}) self.log_debug(self.req.http.lastEffectiveURL) - check = self.check_file({'expired': self.LINK_EXPIRED_PATTERN, + check = self.scan_download({'expired': self.LINK_EXPIRED_PATTERN, 'wait' : re.compile(self.LONG_WAIT_PATTERN), 'limit' : self.DL_LIMIT_PATTERN}) @@ -157,7 +157,7 @@ class FileserveCom(Hoster): def do_captcha(self): captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.data).group(1) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge(captcha_key) res = json.loads(self.load(self.URLS[2], @@ -204,7 +204,7 @@ class FileserveCom(Hoster): self.download(premium_url or self.pyfile.url) if not premium_url and \ - self.check_file({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}): + self.scan_download({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}): self.account.relogin() self.retry(msg=_("Not logged in")) diff --git a/module/plugins/hoster/FileshareInUa.py b/module/plugins/hoster/FileshareInUa.py index 3e863177c..93d1fc894 100644 --- a/module/plugins/hoster/FileshareInUa.py +++ b/module/plugins/hoster/FileshareInUa.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FileshareInUa(DeadHoster): __name__ = "FileshareInUa" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?fileshare\.in\.ua/\w{7}' @@ -15,6 +15,3 @@ class FileshareInUa(DeadHoster): __description__ = """Fileshare.in.ua hoster plugin""" __license__ = "GPLv3" __authors__ = [("fwannmacher", "felipe@warhammerproject.com")] - - -getInfo = create_getInfo(FileshareInUa) diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py index 0b6bfdb88..f04dfc2e5 100644 --- a/module/plugins/hoster/FilesonicCom.py +++ b/module/plugins/hoster/FilesonicCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FilesonicCom(DeadHoster): __name__ = "FilesonicCom" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "stable" __pattern__ = r'http://(?:www\.)?filesonic\.com/file/\w+' @@ -16,6 +16,3 @@ class FilesonicCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("jeix", "jeix@hasnomail.de"), ("paulking", None)] - - -getInfo = create_getInfo(FilesonicCom) diff --git a/module/plugins/hoster/FileuploadNet.py b/module/plugins/hoster/FileuploadNet.py index 891cc5640..fc0486948 100644 --- a/module/plugins/hoster/FileuploadNet.py +++ b/module/plugins/hoster/FileuploadNet.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FileuploadNet(SimpleHoster): __name__ = "FileuploadNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(en\.)?file-upload\.net/download-\d+/.+' @@ -33,6 +33,3 @@ class FileuploadNet(SimpleHoster): def setup(self): self.multiDL = True self.chunk_limit = 1 - - -getInfo = create_getInfo(FileuploadNet) diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py index 649385730..c5d411196 100644 --- a/module/plugins/hoster/FilezyNet.py +++ b/module/plugins/hoster/FilezyNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FilezyNet(DeadHoster): __name__ = "FilezyNet" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __status__ = "stable" __pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}' @@ -15,6 +15,3 @@ class FilezyNet(DeadHoster): __description__ = """Filezy.net hoster plugin""" __license__ = "GPLv3" __authors__ = [] - - -getInfo = create_getInfo(FilezyNet) diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py index 40165944c..377d620e8 100644 --- a/module/plugins/hoster/FiredriveCom.py +++ b/module/plugins/hoster/FiredriveCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FiredriveCom(DeadHoster): __name__ = "FiredriveCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' @@ -15,6 +15,3 @@ class FiredriveCom(DeadHoster): __description__ = """Firedrive.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - -getInfo = create_getInfo(FiredriveCom) diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py index 88d89fbd7..29a197781 100644 --- a/module/plugins/hoster/FlyFilesNet.py +++ b/module/plugins/hoster/FlyFilesNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class FlyFilesNet(SimpleHoster): __name__ = "FlyFilesNet" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'http://(?:www\.)?flyfiles\.net/.+' diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index 1e9d8ce54..ccfd30f4a 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class FourSharedCom(SimpleHoster): __name__ = "FourSharedCom" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?4shared(-china)?\.com/(account/)?(download|get|file|document|photo|video|audio|mp3|office|rar|zip|archive|music)/.+' @@ -64,6 +64,3 @@ class FourSharedCom(SimpleHoster): pass self.wait(20) - - -getInfo = create_getInfo(FourSharedCom) diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index e1366913e..5ce95bd8e 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -4,7 +4,7 @@ import re from module.plugins.internal.Hoster import Hoster from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.utils import seconds_to_midnight +from module.plugins.internal.misc import seconds_to_midnight class FreakshareCom(Hoster): @@ -45,7 +45,7 @@ class FreakshareCom(Hoster): self.download(pyfile.url, post=self.req_opts) - check = self.check_file({ + check = self.scan_download({ 'bad' : "bad try", 'paralell' : "> Sorry, you cant download more then 1 files at time. <", 'empty' : "Warning: Unknown: Filename cannot be empty", @@ -179,7 +179,7 @@ class FreakshareCom(Hoster): challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=(\w+)", herewego) if challenge: - re_captcha = ReCaptcha(self) + re_captcha = ReCaptcha(self.pyfile) (request_options['recaptcha_challenge_field'], request_options['recaptcha_response_field']) = re_captcha.challenge(challenge.group(1)) diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 1865a3901..1cdf00842 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster class FreeWayMe(MultiHoster): __name__ = "FreeWayMe" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?free-way\.(bz|me)/.+' @@ -43,7 +43,7 @@ class FreeWayMe(MultiHoster): if 'location' in header: headers = self.load(header.get('location'), just_header=True) - if headers['code'] == 500: + if headers['code'] is 500: #: Error on 2nd stage self.log_error(_("Error [stage2]")) else: @@ -55,6 +55,3 @@ class FreeWayMe(MultiHoster): self.log_error(_("Error [stage1]")) #@TODO: handle errors - - -getInfo = create_getInfo(FreeWayMe) diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py index 5e4a05a27..832936828 100644 --- a/module/plugins/hoster/FreevideoCz.py +++ b/module/plugins/hoster/FreevideoCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class FreevideoCz(DeadHoster): __name__ = "FreevideoCz" __type__ = "hoster" - __version__ = "0.33" + __version__ = "0.34" __status__ = "stable" __pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+' @@ -15,6 +15,3 @@ class FreevideoCz(DeadHoster): __description__ = """Freevideo.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(FreevideoCz)
\ No newline at end of file diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 6031132c4..8fa920e07 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -5,7 +5,8 @@ import time import urlparse from module.network.RequestFactory import getURL as get_url -from module.plugins.internal.SimpleHoster import SimpleHoster, parse_fileInfo +from module.plugins.internal.Base import parse_fileInfo +from module.plugins.internal.SimpleHoster import SimpleHoster def get_info(urls): @@ -23,7 +24,7 @@ def double_decode(m): class FshareVn(SimpleHoster): __name__ = "FshareVn" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fshare\.vn/file/.+' diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index a9e0f1713..c6449629f 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -1,16 +1,17 @@ # -*- coding: utf-8 -*- -import pycurl import re import urlparse +import pycurl + from module.plugins.internal.Hoster import Hoster, parse_name class Ftp(Hoster): __name__ = "Ftp" __type__ = "hoster" - __version__ = "0.57" + __version__ = "0.58" __status__ = "testing" __pattern__ = r'(?:ftps?|sftp)://([\w\-.]+(:[\w\-.]+)?@)?[\w\-.]+(:\d+)?/.+' diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py index c46c77208..49460f397 100644 --- a/module/plugins/hoster/GamefrontCom.py +++ b/module/plugins/hoster/GamefrontCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class GamefrontCom(SimpleHoster): __name__ = "GamefrontCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?gamefront\.com/files/(?P<ID>\d+)' @@ -37,6 +37,3 @@ class GamefrontCom(SimpleHoster): self.data = self.load("http://www.gamefront.com/files/service/thankyou", get={'id': self.info['pattern']['ID']}) return super(GamefrontCom, self).handle_free(pyfile) - - -getInfo = create_getInfo(GamefrontCom) diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 722a317df..fb8fccc81 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -import pycurl import random import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class GigapetaCom(SimpleHoster): __name__ = "GigapetaCom" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+' @@ -48,6 +47,3 @@ class GigapetaCom(SimpleHoster): just_header=True) self.link = header.get('location') - - -getInfo = create_getInfo(GigapetaCom) diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py index 6d10e6dae..24fb41106 100644 --- a/module/plugins/hoster/GooIm.py +++ b/module/plugins/hoster/GooIm.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class GooIm(SimpleHoster): __name__ = "GooIm" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?goo\.im/.+' @@ -38,6 +38,3 @@ class GooIm(SimpleHoster): def handle_free(self, pyfile): self.wait(10) self.link = pyfile.url - - -getInfo = create_getInfo(GooIm) diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index d70b44efc..ad41ef040 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -6,14 +6,14 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import html_unescape +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)' @@ -55,6 +55,3 @@ class GoogledriveCom(SimpleHoster): else: self.link = dl break - - -getInfo = create_getInfo(GoogledriveCom) diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index c4cbde712..8c540538e 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class HellshareCz(SimpleHoster): __name__ = "HellshareCz" __type__ = "hoster" - __version__ = "0.88" + __version__ = "0.89" __status__ = "testing" __pattern__ = r'http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+' @@ -34,6 +34,3 @@ class HellshareCz(SimpleHoster): def setup(self): self.resume_download = self.multiDL = bool(self.account) self.chunk_limit = 1 - - -getInfo = create_getInfo(HellshareCz) diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index e018a82f1..04c508840 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class HellspyCz(DeadHoster): __name__ = "HellspyCz" __type__ = "hoster" - __version__ = "0.31" + __version__ = "0.32" __status__ = "stable" __pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)' @@ -15,6 +15,3 @@ class HellspyCz(DeadHoster): __description__ = """HellSpy.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(HellspyCz) diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py index 178c11daf..e972839e1 100644 --- a/module/plugins/hoster/HighWayMe.py +++ b/module/plugins/hoster/HighWayMe.py @@ -2,8 +2,8 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import seconds_to_midnight +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import seconds_to_midnight class HighWayMe(MultiHoster): @@ -30,7 +30,7 @@ class HighWayMe(MultiHoster): def check_errors(self): - if self.data.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. + if self.data.get('code') is 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. self.account.relogin() self.retry() @@ -77,6 +77,3 @@ class HighWayMe(MultiHoster): self.pyfile.size = 0 self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1) - - -getInfo = create_getInfo(HighWayMe) diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py index 212578328..0f0d18e19 100644 --- a/module/plugins/hoster/HostujeNet.py +++ b/module/plugins/hoster/HostujeNet.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class HostujeNet(SimpleHoster): __name__ = "HostujeNet" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __pattern__ = r'http://(?:www\.)?hostuje\.net/\w+' @@ -50,6 +50,3 @@ class HostujeNet(SimpleHoster): self.error(_("Form not found")) self.download(action, post=inputs) - - -getInfo = create_getInfo(HostujeNet) diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index be76eebff..291138209 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class HotfileCom(DeadHoster): __name__ = "HotfileCom" __type__ = "hoster" - __version__ = "0.40" + __version__ = "0.41" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+' @@ -18,6 +18,3 @@ class HotfileCom(DeadHoster): ("spoob", "spoob@pyload.org"), ("mkaay", "mkaay@mkaay.de"), ("JoKoT3", "jokot3@gmail.com")] - - -getInfo = create_getInfo(HotfileCom) diff --git a/module/plugins/hoster/Http.py b/module/plugins/hoster/Http.py index 5740e498f..f324ee986 100644 --- a/module/plugins/hoster/Http.py +++ b/module/plugins/hoster/Http.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.Hoster import Hoster, create_getInfo +from module.plugins.internal.Hoster import Hoster class Http(Hoster): __name__ = "Http" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __pattern__ = r'(?:jd|pys?)://.+' @@ -66,9 +66,12 @@ class Http(Hoster): def check_download(self): - errmsg = self.check_file({'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'), - 'Html file' : re.compile(r'\A\s*<!DOCTYPE html'), - 'Request error': re.compile(r'([Aa]n error occured while processing your request)')}) + errmsg = self.scan_download({ + 'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'), + 'Html file' : re.compile(r'\A\s*<!DOCTYPE html'), + 'Request error': re.compile(r'([Aa]n error occured while processing your request)') + }) + if not errmsg: return @@ -80,6 +83,3 @@ class Http(Hoster): self.log_warning(_("Check result: ") + errmsg, _("Waiting 1 minute and retry")) self.retry(3, 60, errmsg) - - -getInfo = create_getInfo(Http) diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py index 2dae78ea2..0c8f1ecc4 100644 --- a/module/plugins/hoster/HugefilesNet.py +++ b/module/plugins/hoster/HugefilesNet.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class HugefilesNet(XFSHoster): __name__ = "HugefilesNet" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'http://(?:www\.)?hugefiles\.net/\w{12}' @@ -28,6 +28,3 @@ class HugefilesNet(XFSHoster): SIZE_PATTERN = r'File Size:</span>\s*<span.*?>(?P<S>[^<]+)</span></div>' FORM_INPUTS_MAP = {'ctype': re.compile(r'\d+')} - - -getInfo = create_getInfo(HugefilesNet) diff --git a/module/plugins/hoster/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py index 8aaf2d770..96af206e1 100644 --- a/module/plugins/hoster/HundredEightyUploadCom.py +++ b/module/plugins/hoster/HundredEightyUploadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class HundredEightyUploadCom(XFSHoster): __name__ = "HundredEightyUploadCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'http://(?:www\.)?180upload\.com/\w{12}' @@ -24,6 +24,3 @@ class HundredEightyUploadCom(XFSHoster): PLUGIN_DOMAIN = "180upload.com" OFFLINE_PATTERN = r'>File Not Found' - - -getInfo = create_getInfo(HundredEightyUploadCom) diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py index f3f6321f7..ec9efcb03 100644 --- a/module/plugins/hoster/IFileWs.py +++ b/module/plugins/hoster/IFileWs.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class IFileWs(DeadHoster): __name__ = "IFileWs" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}' @@ -15,6 +15,3 @@ class IFileWs(DeadHoster): __description__ = """Ifile.ws hoster plugin""" __license__ = "GPLv3" __authors__ = [("z00nx", "z00nx0@gmail.com")] - - -getInfo = create_getInfo(IFileWs) diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py index 507a4d57d..16ae7ce9a 100644 --- a/module/plugins/hoster/IcyFilesCom.py +++ b/module/plugins/hoster/IcyFilesCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class IcyFilesCom(DeadHoster): __name__ = "IcyFilesCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "stable" __pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)' @@ -15,6 +15,3 @@ class IcyFilesCom(DeadHoster): __description__ = """IcyFiles.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("godofdream", "soilfiction@gmail.com")] - - -getInfo = create_getInfo(IcyFilesCom) diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py index 4cb8216aa..73cee4d0f 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class IfileIt(DeadHoster): __name__ = "IfileIt" __type__ = "hoster" - __version__ = "0.32" + __version__ = "0.33" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -15,6 +15,3 @@ class IfileIt(DeadHoster): __description__ = """Ifile.it hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(IfileIt) diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 279d9f0f0..919d37b75 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class IfolderRu(SimpleHoster): __name__ = "IfolderRu" __type__ = "hoster" - __version__ = "0.42" + __version__ = "0.43" __status__ = "testing" __pattern__ = r'http://(?:www)?(files\.)?(ifolder\.ru|metalarea\.org|rusfolder\.(com|net|ru))/(files/)?(?P<ID>\d+)' @@ -61,7 +61,3 @@ class IfolderRu(SimpleHoster): self.retry_captcha() self.link = re.search(self.LINK_FREE_PATTERN, self.data).group(1) - - -getInfo = create_getInfo(IfolderRu) - diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py index f90916eb6..fe3ffb9eb 100644 --- a/module/plugins/hoster/JumbofilesCom.py +++ b/module/plugins/hoster/JumbofilesCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class JumbofilesCom(SimpleHoster): __name__ = "JumbofilesCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P<ID>\w{12})' @@ -37,6 +37,3 @@ class JumbofilesCom(SimpleHoster): post_data = {'id': self.info['pattern']['ID'], 'op': "download3", 'rand': ""} html = self.load(self.pyfile.url, post=post_data) self.link = re.search(self.LINK_FREE_PATTERN, html).group(1) - - -getInfo = create_getInfo(JumbofilesCom) diff --git a/module/plugins/hoster/JunocloudMe.py b/module/plugins/hoster/JunocloudMe.py index 15d596e59..a146a5ea4 100644 --- a/module/plugins/hoster/JunocloudMe.py +++ b/module/plugins/hoster/JunocloudMe.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class JunocloudMe(XFSHoster): __name__ = "JunocloudMe" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'http://(?:\w+\.)?junocloud\.me/\w{12}' @@ -27,6 +27,3 @@ class JunocloudMe(XFSHoster): OFFLINE_PATTERN = r'>No such file with this filename<' TEMP_OFFLINE_PATTERN = r'The page may have been renamed, removed or be temporarily unavailable.<' - - -getInfo = create_getInfo(JunocloudMe) diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index 1dba9713a..560895eb9 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -4,13 +4,13 @@ import re import urlparse from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class Keep2ShareCc(SimpleHoster): __name__ = "Keep2ShareCc" __type__ = "hoster" - __version__ = "0.28" + __version__ = "0.29" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)' @@ -118,7 +118,7 @@ class Keep2ShareCc(SimpleHoster): captcha_url = urlparse.urljoin("http://keep2s.cc/", m.group(1)) post_data['CaptchaForm[code]'] = self.captcha.decrypt(captcha_url) else: - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge() post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) @@ -129,7 +129,3 @@ class Keep2ShareCc(SimpleHoster): self.retry_captcha() else: self.captcha.correct() - - -getInfo = create_getInfo(Keep2ShareCc) - diff --git a/module/plugins/hoster/KickloadCom.py b/module/plugins/hoster/KickloadCom.py index b962c5dad..c0253cddd 100644 --- a/module/plugins/hoster/KickloadCom.py +++ b/module/plugins/hoster/KickloadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class KickloadCom(DeadHoster): __name__ = "KickloadCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "stable" __pattern__ = r'http://(?:www\.)?kickload\.com/get/.+' @@ -15,6 +15,3 @@ class KickloadCom(DeadHoster): __description__ = """Kickload.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("mkaay", "mkaay@mkaay.de")] - - -getInfo = create_getInfo(KickloadCom) diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py index ddc6286b6..14ba59fc7 100644 --- a/module/plugins/hoster/KingfilesNet.py +++ b/module/plugins/hoster/KingfilesNet.py @@ -3,13 +3,13 @@ import re from module.plugins.captcha.SolveMedia import SolveMedia -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class KingfilesNet(SimpleHoster): __name__ = "KingfilesNet" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})' @@ -51,7 +51,7 @@ class KingfilesNet(SimpleHoster): self.data = self.load(pyfile.url, post=post_data) - solvemedia = SolveMedia(self) + solvemedia = SolveMedia(pyfile) response, challenge = solvemedia.challenge() #: Make the downloadlink appear and load the file @@ -79,6 +79,3 @@ class KingfilesNet(SimpleHoster): self.error(_("Download url not found")) self.link = m.group(1) - - -getInfo = create_getInfo(KingfilesNet) diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py index b3633e3be..531fd995e 100644 --- a/module/plugins/hoster/LemUploadsCom.py +++ b/module/plugins/hoster/LemUploadsCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class LemUploadsCom(DeadHoster): __name__ = "LemUploadsCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?lemuploads\.com/\w{12}' @@ -15,6 +15,3 @@ class LemUploadsCom(DeadHoster): __description__ = """LemUploads.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("t4skforce", "t4skforce1337[AT]gmail[DOT]com")] - - -getInfo = create_getInfo(LemUploadsCom) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 2d50651bd..199057b48 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -9,11 +9,11 @@ import re import urlparse -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.network.RequestFactory import getURL as get_url from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster -from module.plugins.internal.utils import seconds_to_midnight +from module.plugins.internal.misc import seconds_to_midnight def api_response(url): @@ -91,7 +91,7 @@ class LetitbitNet(SimpleHoster): self.log_debug(res) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge() post_data = {'recaptcha_challenge_field': challenge, diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 9ac1053c2..18d9b5677 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -3,8 +3,8 @@ import re import urlparse -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class LinksnappyCom(MultiHoster): @@ -52,6 +52,3 @@ class LinksnappyCom(MultiHoster): def _get_host(url): host = urlparse.urlsplit(url).netloc return re.search(r'[\w\-]+\.\w+$', host).group(0) - - -getInfo = create_getInfo(LinksnappyCom) diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 83c312a2f..af5032b00 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -7,13 +7,13 @@ import re from module.plugins.captcha.SolveMedia import SolveMedia -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class LoadTo(SimpleHoster): __name__ = "LoadTo" __type__ = "hoster" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __pattern__ = r'http://(?:www\.)?load\.to/\w+' @@ -58,7 +58,7 @@ class LoadTo(SimpleHoster): self.wait(m.group(1)) #: Load.to is using solvemedia captchas since ~july 2014: - solvemedia = SolveMedia(self) + solvemedia = SolveMedia(pyfile) captcha_key = solvemedia.detect_key() if captcha_key: @@ -67,6 +67,3 @@ class LoadTo(SimpleHoster): post={'adcopy_challenge': challenge, 'adcopy_response' : response, 'returnUrl' : pyfile.url}) - - -getInfo = create_getInfo(LoadTo) diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py index ae3b61210..4dc1ce751 100644 --- a/module/plugins/hoster/LolabitsEs.py +++ b/module/plugins/hoster/LolabitsEs.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import html_unescape +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import html_unescape class LolabitsEs(SimpleHoster): __name__ = "LolabitsEs" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?lolabits\.es/.+' @@ -50,6 +50,3 @@ class LolabitsEs(SimpleHoster): decode="unicode-escape") self.link = html_unescape(re.search(self.LINK_PATTERN, self.data).group(1)) - - -getInfo = create_getInfo(LolabitsEs) diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py index cb92d7741..6c82be808 100644 --- a/module/plugins/hoster/LomafileCom.py +++ b/module/plugins/hoster/LomafileCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class LomafileCom(DeadHoster): __name__ = "LomafileCom" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __status__ = "stable" __pattern__ = r'http://lomafile\.com/\w{12}' @@ -16,6 +16,3 @@ class LomafileCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("nath_schwarz", "nathan.notwhite@gmail.com"), ("guidobelix", "guidobelix@hotmail.it")] - - -getInfo = create_getInfo(LomafileCom) diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 47ffb295e..96fd0f829 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -2,15 +2,15 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class LuckyShareNet(SimpleHoster): __name__ = "LuckyShareNet" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P<ID>\d{10,})' @@ -54,7 +54,7 @@ class LuckyShareNet(SimpleHoster): jso = self.parse_json(rep) self.wait(jso['time']) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge() rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" % @@ -70,6 +70,3 @@ class LuckyShareNet(SimpleHoster): jso.update(self.parse_json(rep)) if jso['link']: self.link = jso['link'] - - -getInfo = create_getInfo(LuckyShareNet) diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 5917ffd5b..00d3e1348 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -2,13 +2,13 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.captcha.SolveMedia import SolveMedia -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class MediafireCom(SimpleHoster): __name__ = "MediafireCom" __type__ = "hoster" - __version__ = "0.93" + __version__ = "0.94" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w+)' @@ -41,7 +41,7 @@ class MediafireCom(SimpleHoster): def handle_captcha(self): - solvemedia = SolveMedia(self) + solvemedia = SolveMedia(self.pyfile) captcha_key = solvemedia.detect_key() if captcha_key: @@ -51,7 +51,7 @@ class MediafireCom(SimpleHoster): 'adcopy_response' : response}) return - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) captcha_key = recaptcha.detect_key() if captcha_key: @@ -76,6 +76,3 @@ class MediafireCom(SimpleHoster): self.fail(_("Wrong password")) return super(MediafireCom, self).handle_free(pyfile) - - -getInfo = create_getInfo(MediafireCom) diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 52851d80a..054116404 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -1,19 +1,17 @@ # -*- coding: utf-8 -*- import array +import base64 import os import random import re +import Crypto.Cipher +import Crypto.Util # import pycurl -from base64 import standard_b64decode - -from Crypto.Cipher import AES -from Crypto.Util import Counter - from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import decode, encode, json +from module.plugins.internal.misc import decode, encode, json ############################ General errors ################################### @@ -48,7 +46,7 @@ from module.plugins.internal.utils import decode, encode, json class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.33" + __version__ = "0.34" __status__ = "testing" __pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w\-,]+)' @@ -96,7 +94,7 @@ class MegaCoNz(Hoster): def decrypt_attr(self, data, key): k, iv, meta_mac = self.get_cipher_key(key) - cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) + cbc = Crypto.Cipher.AES.new(k, Crypto.Cipher.AES.MODE_CBC, "\0" * 16) attr = decode(cbc.decrypt(self.b64_decode(data))) self.log_debug("Decrypted Attr: %s" % attr) @@ -116,8 +114,8 @@ class MegaCoNz(Hoster): #: Convert counter to long and shift bytes k, iv, meta_mac = self.get_cipher_key(key) - ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) - cipher = AES.new(k, AES.MODE_CTR, counter=ctr) + ctr = Crypto.Util.Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) + cipher = Crypto.Cipher.AES.new(k, Crypto.Cipher.AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") self.pyfile.setProgress(0) diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py index 4772ac1fe..8a8380cbd 100644 --- a/module/plugins/hoster/MegaDebridEu.py +++ b/module/plugins/hoster/MegaDebridEu.py @@ -3,14 +3,14 @@ import re import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __type__ = "hoster" - __version__ = "0.52" + __version__ = "0.53" __status__ = "testing" __pattern__ = r'http://((?:www\d+\.|s\d+\.)?mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+' @@ -61,6 +61,3 @@ class MegaDebridEu(MultiHoster): res = json.loads(jsonResponse) if res['response_code'] == "ok": self.link = res['debridLink'][1:-1] - - -getInfo = create_getInfo(MegaDebridEu) diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py index 8ec8a56a4..9a0173df0 100644 --- a/module/plugins/hoster/MegaFilesSe.py +++ b/module/plugins/hoster/MegaFilesSe.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class MegaFilesSe(DeadHoster): __name__ = "MegaFilesSe" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?megafiles\.se/\w{12}' @@ -15,6 +15,3 @@ class MegaFilesSe(DeadHoster): __description__ = """MegaFiles.se hoster plugin""" __license__ = "GPLv3" __authors__ = [("t4skforce", "t4skforce1337[AT]gmail[DOT]com")] - - -getInfo = create_getInfo(MegaFilesSe) diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index dee74e653..3d1b288d6 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -1,11 +1,13 @@ # -*- coding: utf-8 -*- -import pycurl import re +import pycurl + from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getRequest as get_request -from module.plugins.internal.SimpleHoster import SimpleHoster, parse_fileInfo +from module.plugins.internal.Base import parse_fileInfo +from module.plugins.internal.SimpleHoster import SimpleHoster def get_info(urls): @@ -22,7 +24,7 @@ def get_info(urls): class MegaRapidCz(SimpleHoster): __name__ = "MegaRapidCz" __type__ = "hoster" - __version__ = "0.61" + __version__ = "0.62" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+' diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py index 6094cf6ac..68a74bf66 100644 --- a/module/plugins/hoster/MegaRapidoNet.py +++ b/module/plugins/hoster/MegaRapidoNet.py @@ -2,7 +2,7 @@ import random -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster def random_with_n_digits(n): @@ -23,7 +23,7 @@ def random_with_n_digits(n): class MegaRapidoNet(MultiHoster): __name__ = "MegaRapidoNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+' @@ -58,7 +58,3 @@ class MegaRapidoNet(MultiHoster): self.error(_("You have logged in at another place")) return super(MegaRapidoNet, self).handle_premium(pyfile) - - -getInfo = create_getInfo(MegaRapidoNet) - diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 484ff8da1..ee0531b2b 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -2,7 +2,7 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.hoster.MegaCoNz import MegaCoNz @@ -10,7 +10,7 @@ from module.plugins.hoster.MegaCoNz import MegaCoNz class MegacrypterCom(MegaCoNz): __name__ = "MegacrypterCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "testing" __pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w\-!]+' diff --git a/module/plugins/hoster/MegareleaseOrg.py b/module/plugins/hoster/MegareleaseOrg.py index 0c798a588..379d0c0f8 100644 --- a/module/plugins/hoster/MegareleaseOrg.py +++ b/module/plugins/hoster/MegareleaseOrg.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class MegareleaseOrg(DeadHoster): __name__ = "MegareleaseOrg" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?megarelease\.org/\w{12}' @@ -16,6 +16,3 @@ class MegareleaseOrg(DeadHoster): __license__ = "GPLv3" __authors__ = [("derek3x", "derek3x@vmail.me"), ("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(MegareleaseOrg) diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index 2d6e0f0d5..5e5c023e4 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -3,13 +3,13 @@ import re import time -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class MegasharesCom(SimpleHoster): __name__ = "MegasharesCom" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\?d\d{2}=|dl/)\w+' @@ -108,6 +108,3 @@ class MegasharesCom(SimpleHoster): self.link = m.group(1) self.log_debug("%s: %s" % (msg, self.link)) - - -getInfo = create_getInfo(MegasharesCom) diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 4b985ea84..9fea42a73 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class MegauploadCom(DeadHoster): __name__ = "MegauploadCom" __type__ = "hoster" - __version__ = "0.34" + __version__ = "0.35" __status__ = "stable" __pattern__ = r'http://(?:www\.)?megaupload\.com/\?.*&?(d|v)=\w+' @@ -15,6 +15,3 @@ class MegauploadCom(DeadHoster): __description__ = """Megaupload.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("spoob", "spoob@pyload.org")] - - -getInfo = create_getInfo(MegauploadCom) diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py index 4bb2b9413..1015db5dc 100644 --- a/module/plugins/hoster/MegavideoCom.py +++ b/module/plugins/hoster/MegavideoCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class MegavideoCom(DeadHoster): __name__ = "MegavideoCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "stable" __pattern__ = r'http://(?:www\.)?megavideo\.com/\?.*&?(d|v)=\w+' @@ -16,6 +16,3 @@ class MegavideoCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("jeix", "jeix@hasnomail.de"), ("mkaay", "mkaay@mkaay.de")] - - -getInfo = create_getInfo(MegavideoCom) diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py index 9e5b8e2c2..0de1d0d50 100644 --- a/module/plugins/hoster/MovReelCom.py +++ b/module/plugins/hoster/MovReelCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class MovReelCom(XFSHoster): __name__ = "MovReelCom" __type__ = "hoster" - __version__ = "1.28" + __version__ = "1.29" __status__ = "testing" __pattern__ = r'http://(?:www\.)?movreel\.com/\w{12}' @@ -24,6 +24,3 @@ class MovReelCom(XFSHoster): PLUGIN_DOMAIN = "movreel.com" LINK_PATTERN = r'<a href="(.+?)">Download Link' - - -getInfo = create_getInfo(MovReelCom) diff --git a/module/plugins/hoster/MultihostersCom.py b/module/plugins/hoster/MultihostersCom.py index 58e4ce0e4..fc6aca3bc 100644 --- a/module/plugins/hoster/MultihostersCom.py +++ b/module/plugins/hoster/MultihostersCom.py @@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom class MultihostersCom(ZeveraCom): __name__ = "MultihostersCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'https?://(?:www\.)multihosters\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+' diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index 051985c1d..fd326da58 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -3,13 +3,13 @@ import random import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class MultishareCz(SimpleHoster): __name__ = "MultishareCz" __type__ = "hoster" - __version__ = "0.45" + __version__ = "0.46" __status__ = "testing" __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)' @@ -54,6 +54,3 @@ class MultishareCz(SimpleHoster): 'u_hash': self.acc_info['u_hash'], 'link' : pyfile.url}, disposition=True) - - -getInfo = create_getInfo(MultishareCz) diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 5424bbebe..defa1847c 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class MyfastfileCom(MultiHoster): __name__ = "MyfastfileCom" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' @@ -41,6 +41,3 @@ class MyfastfileCom(MultiHoster): self.fail(_("Unable to unrestrict link")) self.link = self.data['link'] - - -getInfo = create_getInfo(MyfastfileCom) diff --git a/module/plugins/hoster/MystoreTo.py b/module/plugins/hoster/MystoreTo.py index 7429900c5..31c472f29 100644 --- a/module/plugins/hoster/MystoreTo.py +++ b/module/plugins/hoster/MystoreTo.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class MystoreTo(SimpleHoster): __name__ = "MystoreTo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?mystore\.to/dl/.+' @@ -46,6 +46,3 @@ class MystoreTo(SimpleHoster): self.link = self.load("http://mystore.to/api/download", post={'FID': fid}) - - -getInfo = create_getInfo(MystoreTo) diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index ee52cb121..410d81249 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -3,13 +3,13 @@ import re from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import html_unescape +from module.plugins.internal.misc import html_unescape class MyvideoDe(Hoster): __name__ = "MyvideoDe" __type__ = "hoster" - __version__ = "0.94" + __version__ = "0.95" __status__ = "testing" __pattern__ = r'http://(?:www\.)?myvideo\.de/watch/' diff --git a/module/plugins/hoster/NahrajCz.py b/module/plugins/hoster/NahrajCz.py index 73169aa22..c46d5112f 100644 --- a/module/plugins/hoster/NahrajCz.py +++ b/module/plugins/hoster/NahrajCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class NahrajCz(DeadHoster): __name__ = "NahrajCz" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "stable" __pattern__ = r'http://(?:www\.)?nahraj\.cz/content/download/.+' @@ -15,6 +15,3 @@ class NahrajCz(DeadHoster): __description__ = """Nahraj.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(NahrajCz) diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index e34dcbc2d..4f7c7e321 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -4,13 +4,13 @@ import random import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class NarodRu(SimpleHoster): __name__ = "NarodRu" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+\-narod\.yandex\.ru)/(?P<ID>\d+)/.+' @@ -57,6 +57,3 @@ class NarodRu(SimpleHoster): elif u'<b class="error-msg"><strong>ÐÑОблОÑÑ?</strong>' in self.data: self.retry_captcha() - - -getInfo = create_getInfo(NarodRu) diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index c646217c3..28da823a7 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class NetloadIn(DeadHoster): __name__ = "NetloadIn" __type__ = "hoster" - __version__ = "0.53" + __version__ = "0.54" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?netload\.(in|me)/(?P<PATH>datei|index\.php\?id=10&file_id=)(?P<ID>\w+)' @@ -17,6 +17,3 @@ class NetloadIn(DeadHoster): __authors__ = [("spoob", "spoob@pyload.org"), ("RaNaN", "ranan@pyload.org"), ("Gregy", "gregy@gregy.cz" )] - - -getInfo = create_getInfo(NetloadIn) diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index 9ca6ab187..304b7a87d 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster class NitroflareCom(SimpleHoster): __name__ = "NitroflareCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)' @@ -57,7 +57,7 @@ class NitroflareCom(SimpleHoster): self.wait(wait_time) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) self.data = self.load("http://nitroflare.com/ajax/freeDownload.php", diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index 48db4be71..7a244e745 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class NoPremiumPl(MultiHoster): __name__ = "NoPremiumPl" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://direct\.nopremium\.pl.+' @@ -103,6 +103,3 @@ class NoPremiumPl(MultiHoster): except Exception: self.temp_offline("Query error #2") - - -getInfo = create_getInfo(NoPremiumPl) diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py index 9171d3b32..2b94e3bbc 100644 --- a/module/plugins/hoster/NosuploadCom.py +++ b/module/plugins/hoster/NosuploadCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class NosuploadCom(XFSHoster): __name__ = "NosuploadCom" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __pattern__ = r'http://(?:www\.)?nosupload\.com/\?d=\w{12}' @@ -45,6 +45,3 @@ class NosuploadCom(XFSHoster): #: Stage3: get the download link return re.search(self.LINK_PATTERN, self.data, re.S).group(1) - - -getInfo = create_getInfo(NosuploadCom) diff --git a/module/plugins/hoster/NovafileCom.py b/module/plugins/hoster/NovafileCom.py index 622108c85..7229a88a0 100644 --- a/module/plugins/hoster/NovafileCom.py +++ b/module/plugins/hoster/NovafileCom.py @@ -4,13 +4,13 @@ # http://novafile.com/vfun4z6o2cit # http://novafile.com/s6zrr5wemuz4 -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class NovafileCom(XFSHoster): __name__ = "NovafileCom" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'http://(?:www\.)?novafile\.com/\w{12}' @@ -32,6 +32,3 @@ class NovafileCom(XFSHoster): WAIT_PATTERN = r'<p>Please wait <span id="count".*?>(\d+)</span> seconds</p>' LINK_PATTERN = r'<a href="(http://s\d+\.novafile\.com/.*?)" class="btn btn-green">Download File</a>' - - -getInfo = create_getInfo(NovafileCom) diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py index 6737ffc5b..a57e6eb55 100644 --- a/module/plugins/hoster/NowDownloadSx.py +++ b/module/plugins/hoster/NowDownloadSx.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class NowDownloadSx(SimpleHoster): __name__ = "NowDownloadSx" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(nowdownload\.[a-zA-Z]{2,}/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+' @@ -62,6 +62,3 @@ class NowDownloadSx(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) - - -getInfo = create_getInfo(NowDownloadSx) diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index cc45faf77..a9d7d2a0f 100644 --- a/module/plugins/hoster/NowVideoSx.py +++ b/module/plugins/hoster/NowVideoSx.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class NowVideoSx(SimpleHoster): __name__ = "NowVideoSx" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __pattern__ = r'http://(?:www\.)?nowvideo\.[a-zA-Z]{2,}/(video/|mobile/(#/videos/|.+?id=))(?P<ID>\w+)' @@ -43,6 +43,3 @@ class NowVideoSx(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) - - -getInfo = create_getInfo(NowVideoSx) diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 23340e2ce..340ca170d 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -5,7 +5,7 @@ import re -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.internal.Hoster import Hoster from module.plugins.captcha.ReCaptcha import ReCaptcha @@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.41" + __version__ = "0.42" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})' @@ -67,14 +67,14 @@ class OboomCom(Hoster): else: apiUrl = "http://www.oboom.com/1.0/guestsession" result = self.load_url(apiUrl) - if result[0] == 200: + if result[0] is 200: self.session_token = result[1] else: self.fail(_("Could not retrieve token for guest session. Error code: %s") % result[0]) def solve_captcha(self): - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) apiUrl = "http://www.oboom.com/1.0/download/ticket" @@ -85,14 +85,14 @@ class OboomCom(Hoster): result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: self.download_token = result[1] self.download_auth = result[2] self.captcha.correct() self.wait(30) else: - if result[0] == 403: + if result[0] is 403: if result[1] == -1: #: Another download is running self.set_wait(15 * 60) else: @@ -102,7 +102,7 @@ class OboomCom(Hoster): self.wait() self.retry(5) - elif result[0] == 400 and result[1] == "forbidden": + elif result[0] is 400 and result[1] == "forbidden": self.retry(5, 15 * 60, _("Service unavailable")) self.retry_captcha() @@ -113,7 +113,7 @@ class OboomCom(Hoster): params = {'token': token, 'items': fileId, 'http_errors': 0} result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: item = result[1][0] if item['state'] == "online": self.file_size = item['size'] @@ -134,10 +134,10 @@ class OboomCom(Hoster): params['auth'] = self.download_auth result = self.load_url(apiUrl, params) - if result[0] == 200: + if result[0] is 200: self.download_domain = result[1] self.download_ticket = result[2] - elif result[0] == 421: + elif result[0] is 421: self.retry(wait=result[2] + 60, msg=_("Connection limit exceeded")) else: self.fail(_("Could not retrieve download ticket. Error code: %s") % result[0]) diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index ef6f49da3..953ca2715 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -3,7 +3,7 @@ import re from module.network.RequestFactory import getURL as get_url -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class OneFichierCom(SimpleHoster): @@ -86,8 +86,6 @@ class OneFichierCom(SimpleHoster): def handle_free(self, pyfile): - self.check_errors() - url, inputs = self.parse_html_form('action="https://1fichier.com/\?[\w^_]+') if not url: @@ -98,7 +96,7 @@ class OneFichierCom(SimpleHoster): inputs['dl_no_ssl'] = "on" - self.data=self.load(url, post=inputs) + self.data = self.load(url, post=inputs) m = re.search(self.LINK_PATTERN, self.data) if m: @@ -106,6 +104,4 @@ class OneFichierCom(SimpleHoster): def handle_premium(self, pyfile): - self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"}, disposition=False) #@TODO: Remove disposition in 0.4.10 - - + self.download(pyfile.url, post={'did': 1, 'dl_no_ssl': "on"}, disposition=False) #@TODO: Remove disposition in 0.4.10 diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py index 48638bdab..57a7e72b1 100644 --- a/module/plugins/hoster/OpenloadIo.py +++ b/module/plugins/hoster/OpenloadIo.py @@ -3,14 +3,14 @@ import re from module.network.RequestFactory import getURL -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import json class OpenloadIo(SimpleHoster): __name__ = "OpenloadIo" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?openload\.(co|io)/(f|embed)/(?P<ID>[\w\-]+)' @@ -67,6 +67,3 @@ class OpenloadIo(SimpleHoster): download_json = self._load_json(self._DOWNLOAD_FILE_URI_PATTERN.format(file_id, ticket)) self.link = download_json['result']['url'] - - -getInfo = create_getInfo(OpenloadIo) diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py index 0be85d6fd..6fac2d014 100644 --- a/module/plugins/hoster/OronCom.py +++ b/module/plugins/hoster/OronCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class OronCom(DeadHoster): __name__ = "OronCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}' @@ -16,6 +16,3 @@ class OronCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("chrox", "chrox@pyload.org"), ("DHMH", "DHMH@pyload.org")] - - -getInfo = create_getInfo(OronCom) diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index f3c04b516..07d906b15 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -3,14 +3,14 @@ import re import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json, parse_size +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json, parse_size class OverLoadMe(MultiHoster): __name__ = "OverLoadMe" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __pattern__ = r'https?://.*overload\.me/.+' @@ -40,7 +40,7 @@ class OverLoadMe(MultiHoster): self.log_debug(data) - if data['error'] == 1: + if data['error'] is 1: self.log_warning(data['msg']) self.temp_offline() else: @@ -48,6 +48,3 @@ class OverLoadMe(MultiHoster): if pyfile.name and pyfile.name.endswith('.tmp') and data['filename']: pyfile.name = data['filename'] pyfile.size = parse_size(data['filesize']) - - -getInfo = create_getInfo(OverLoadMe) diff --git a/module/plugins/hoster/PandaplaNet.py b/module/plugins/hoster/PandaplaNet.py index 0a6e499ee..ebc0fdaa7 100644 --- a/module/plugins/hoster/PandaplaNet.py +++ b/module/plugins/hoster/PandaplaNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class PandaplaNet(DeadHoster): __name__ = "PandaplaNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "stable" __pattern__ = r'http://(?:www\.)?pandapla\.net/\w{12}' @@ -15,6 +15,3 @@ class PandaplaNet(DeadHoster): __description__ = """Pandapla.net hoster plugin""" __license__ = "GPLv3" __authors__ = [("t4skforce", "t4skforce1337[AT]gmail[DOT]com")] - - -getInfo = create_getInfo(PandaplaNet) diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py index a5f11e7fa..0f0291f76 100644 --- a/module/plugins/hoster/PornhostCom.py +++ b/module/plugins/hoster/PornhostCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster class PornhostCom(Hoster): __name__ = "PornhostCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __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 c3a734037..e93f765ad 100644 --- a/module/plugins/hoster/PornhubCom.py +++ b/module/plugins/hoster/PornhubCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster class PornhubCom(Hoster): __name__ = "PornhubCom" __type__ = "hoster" - __version__ = "0.54" + __version__ = "0.55" __status__ = "testing" __pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+' diff --git a/module/plugins/hoster/PotloadCom.py b/module/plugins/hoster/PotloadCom.py index 8eaca6ebe..7d8cdb5cc 100644 --- a/module/plugins/hoster/PotloadCom.py +++ b/module/plugins/hoster/PotloadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class PotloadCom(DeadHoster): __name__ = "PotloadCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?potload\.com/\w{12}' @@ -15,6 +15,3 @@ class PotloadCom(DeadHoster): __description__ = """Potload.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(PotloadCom) diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index 9f005efe0..d550c91bd 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -4,14 +4,14 @@ from __future__ import with_statement import os -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import encode +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.28" + __version__ = "0.29" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -42,21 +42,20 @@ class PremiumTo(MultiHoster): def check_download(self): - if self.check_file({'nopremium': "No premium account available"}): + if self.scan_download({'nopremium': "No premium account available"}): self.retry(60, 5 * 60, "No premium account available") err = "" if self.req.http.code == "420": #: Custom error code send - fail file = encode(self.last_download) + with open(file, "rb") as f: err = f.read(256).strip() - os.remove(file) + + self.remove(file) if err: self.fail(err) return super(PremiumTo, self).check_download() - - -getInfo = create_getInfo(PremiumTo) diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py index eeb002cb0..ce909cc64 100644 --- a/module/plugins/hoster/PremiumizeMe.py +++ b/module/plugins/hoster/PremiumizeMe.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class PremiumizeMe(MultiHoster): __name__ = "PremiumizeMe" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __status__ = "testing" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate @@ -47,7 +47,7 @@ class PremiumizeMe(MultiHoster): #: Check status and decide what to do status = data['status'] - if status == 200: + if status is 200: if 'filename' in data['result']: self.pyfile.name = data['result']['filename'] @@ -57,10 +57,10 @@ class PremiumizeMe(MultiHoster): self.link = data['result']['location'] return - elif status == 400: + elif status is 400: self.fail(_("Invalid url")) - elif status == 404: + elif status is 404: self.offline() elif status >= 500: @@ -68,6 +68,3 @@ class PremiumizeMe(MultiHoster): else: self.fail(data['statusmessage']) - - -getInfo = create_getInfo(PremiumizeMe) diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py index 6f92dcea2..c674f19f5 100644 --- a/module/plugins/hoster/PromptfileCom.py +++ b/module/plugins/hoster/PromptfileCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class PromptfileCom(SimpleHoster): __name__ = "PromptfileCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?promptfile\.com/' @@ -44,6 +44,3 @@ class PromptfileCom(SimpleHoster): #: STAGE 2: get the direct link return super(PromptfileCom, self).handle_free(pyfile) - - -getInfo = create_getInfo(PromptfileCom) diff --git a/module/plugins/hoster/PrzeklejPl.py b/module/plugins/hoster/PrzeklejPl.py index 5c8e66194..f8a67097e 100644 --- a/module/plugins/hoster/PrzeklejPl.py +++ b/module/plugins/hoster/PrzeklejPl.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class PrzeklejPl(DeadHoster): __name__ = "PrzeklejPl" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "stable" __pattern__ = r'http://(?:www\.)?przeklej\.pl/plik/.+' @@ -15,6 +15,3 @@ class PrzeklejPl(DeadHoster): __description__ = """Przeklej.pl hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(PrzeklejPl) diff --git a/module/plugins/hoster/PutdriveCom.py b/module/plugins/hoster/PutdriveCom.py index eabb42e4d..cd81183ea 100644 --- a/module/plugins/hoster/PutdriveCom.py +++ b/module/plugins/hoster/PutdriveCom.py @@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom class PutdriveCom(ZeveraCom): __name__ = "PutdriveCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'https?://(?:www\.)putdrive\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+' diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index abcd24d1e..49a55c6b1 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -1,15 +1,14 @@ # -*- coding: utf-8 -*- -import pycurl import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" - __version__ = "0.60" + __version__ = "0.61" __status__ = "testing" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' @@ -54,7 +53,7 @@ class QuickshareCz(SimpleHoster): else: self.handle_free(pyfile) - if self.check_file({'error': re.compile(r"\AChyba!")}, max_size=100): + if self.scan_download({'error': re.compile(r"\AChyba!")}, read_size=100): self.fail(_("File not m or plugin defect")) @@ -88,6 +87,3 @@ class QuickshareCz(SimpleHoster): download_url = '%s/download_premium.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID4", "ID5")) self.download(download_url, get=data) - - -getInfo = create_getInfo(QuickshareCz) diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index 72efe9914..a662db101 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __pattern__ = r'https?://.+rpnet\.biz' @@ -79,6 +79,3 @@ class RPNetBiz(MultiHoster): self.fail(link_status['error']) else: self.fail(_("Something went wrong, not supposed to enter here")) - - -getInfo = create_getInfo(RPNetBiz) diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index e0cc2c6d3..fc62c4b34 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class RapideoPl(MultiHoster): __name__ = "RapideoPl" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -103,6 +103,3 @@ class RapideoPl(MultiHoster): except Exception: self.temp_offline("Query error #2") - - -getInfo = create_getInfo(RapideoPl) diff --git a/module/plugins/hoster/RapidfileshareNet.py b/module/plugins/hoster/RapidfileshareNet.py index 546e17a8d..d8f2a5a9e 100644 --- a/module/plugins/hoster/RapidfileshareNet.py +++ b/module/plugins/hoster/RapidfileshareNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class RapidfileshareNet(XFSHoster): __name__ = "RapidfileshareNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?rapidfileshare\.net/\w{12}' @@ -28,6 +28,3 @@ class RapidfileshareNet(XFSHoster): OFFLINE_PATTERN = r'>No such file with this filename' TEMP_OFFLINE_PATTERN = r'The page may have been renamed, removed or be temporarily unavailable.<' - - -getInfo = create_getInfo(RapidfileshareNet) diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 150aec221..3966275e0 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -1,20 +1,21 @@ # -*- coding: utf-8 -*- -import pycurl import re -from module.plugins.internal.utils import json +import pycurl + from module.network.HTTPRequest import BadHeader from module.plugins.captcha.AdsCaptcha import AdsCaptcha from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.captcha.SolveMedia import SolveMedia -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import json class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" - __version__ = "0.38" + __version__ = "0.39" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+' @@ -81,10 +82,10 @@ class RapidgatorNet(SimpleHoster): status = e.code msg = e - if status == 200: + if status is 200: return jso['response'] - elif status == 423: + elif status is 423: self.account.empty() self.retry() @@ -149,7 +150,7 @@ class RapidgatorNet(SimpleHoster): def handle_captcha(self): for klass in (AdsCaptcha, ReCaptcha, SolveMedia): - inst = klass(self) + inst = klass(self.pyfile) if inst.detect_key(): return inst @@ -160,6 +161,3 @@ class RapidgatorNet(SimpleHoster): self.retry() self.log_debug(url, res) return json.loads(res) - - -getInfo = create_getInfo(RapidgatorNet) diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py index 09910de69..9a1501c8d 100644 --- a/module/plugins/hoster/RapiduNet.py +++ b/module/plugins/hoster/RapiduNet.py @@ -1,18 +1,18 @@ # -*- coding: utf-8 -*- -import pycurl import re import time -from module.plugins.internal.utils import json -from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +import pycurl +from module.plugins.captcha.ReCaptcha import ReCaptcha +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import json class RapiduNet(SimpleHoster): __name__ = "RapiduNet" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})' @@ -60,7 +60,7 @@ class RapiduNet(SimpleHoster): else: self.wait(int(jsvars['timeToDownload']) - int(time.time())) - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) jsvars = self.get_json_response("https://rapidu.net/ajax.php", @@ -82,6 +82,3 @@ class RapiduNet(SimpleHoster): self.log_debug(res) return json.loads(res) - - -getInfo = create_getInfo(RapiduNet) diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index c9ea75cb1..390063d10 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -26,6 +26,3 @@ class RarefileNet(XFSHoster): PLUGIN_DOMAIN = "rarefile.net" LINK_PATTERN = r'<a href="(.+?)">\1</a>' - - -getInfo = create_getInfo(RarefileNet) diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index a8d2f7da1..8cf9ab8ce 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -4,14 +4,14 @@ import re import time import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json, parse_size +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json, parse_size class RealdebridCom(MultiHoster): __name__ = "RealdebridCom" __type__ = "hoster" - __version__ = "0.71" + __version__ = "0.72" __status__ = "testing" __pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+' @@ -40,7 +40,7 @@ class RealdebridCom(MultiHoster): self.log_debug("Returned Data: %s" % data) - if data['error'] != 0: + if data['error'] is not 0: if data['message'] == "Your file is unavailable on the hoster.": self.offline() else: @@ -51,6 +51,3 @@ class RealdebridCom(MultiHoster): pyfile.name = data['file_name'] pyfile.size = parse_size(data['file_size']) self.link = data['generated_links'][0][-1] - - -getInfo = create_getInfo(RealdebridCom) diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 751458f9f..f236b4f4d 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -3,13 +3,13 @@ import re from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import html_unescape +from module.plugins.internal.misc import html_unescape class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 011a79c79..2ec62274a 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -2,13 +2,13 @@ import urllib -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "testing" __pattern__ = r'https?://.*rehost\.to\..+' @@ -30,6 +30,3 @@ class RehostTo(MultiHoster): 'pass': self.account.get_data('session'), 'dl' : pyfile.url}, disposition=True) - - -getInfo = create_getInfo(RehostTo) diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 90fe3a26f..76fcc17a5 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -10,13 +10,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class RemixshareCom(SimpleHoster): __name__ = "RemixshareCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' @@ -34,7 +34,7 @@ class RemixshareCom(SimpleHoster): INFO_PATTERN = r'title=\'.+?\'>(?P<N>.+?)</span><span class=\'light2\'> \((?P<S>\d+) (?P<U>[\w^_]+)\)<' - HASHSUM_PATTERN = r'>(?P<T>MD5): (?P<H>\w+)' + HASHSUM_PATTERN = r'>(?P<H>MD5): (?P<D>\w+)' OFFLINE_PATTERN = r'<h1>Ooops!' LINK_PATTERN = r'var uri = "(.+?)"' @@ -58,6 +58,3 @@ class RemixshareCom(SimpleHoster): self.error(_("File token")) self.link = b.group(1) + "/zzz/" + c.group(1) - - -getInfo = create_getInfo(RemixshareCom) diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index dc4aeb6a3..29da1de23 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class RgHostNet(SimpleHoster): __name__ = "RgHostNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __pattern__ = r'http://(?:www\.)?rghost\.(net|ru)/[\d\-]+' @@ -24,10 +24,7 @@ class RgHostNet(SimpleHoster): INFO_PATTERN = r'data-share42-text="(?P<N>.+?) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)' - HASHSUM_PATTERN = r'<dt>(?P<T>\w+)</dt>\s*<dd>(?P<H>\w+)' + HASHSUM_PATTERN = r'<dt>(?P<H>\w+)</dt>\s*<dd>(?P<D>\w+)' OFFLINE_PATTERN = r'>(File is deleted|page not found)' LINK_FREE_PATTERN = r'<a href="(.+?)" class="btn large' - - -getInfo = create_getInfo(RgHostNet) diff --git a/module/plugins/hoster/RyushareCom.py b/module/plugins/hoster/RyushareCom.py index 392b18348..16619d604 100644 --- a/module/plugins/hoster/RyushareCom.py +++ b/module/plugins/hoster/RyushareCom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class RyushareCom(DeadHoster): @@ -17,6 +17,3 @@ class RyushareCom(DeadHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it"), ("quareevo", "quareevo@arcor.de" )] - - -getInfo = create_getInfo(RyushareCom) diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py index 0de0e9556..cdcf00e88 100644 --- a/module/plugins/hoster/SafesharingEu.py +++ b/module/plugins/hoster/SafesharingEu.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class SafesharingEu(XFSHoster): __name__ = "SafesharingEu" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}' @@ -24,6 +24,3 @@ class SafesharingEu(XFSHoster): PLUGIN_DOMAIN = "safesharing.eu" ERROR_PATTERN = r'(?:<div class="alert alert-danger">)(.+?)(?:</div>)' - - -getInfo = create_getInfo(SafesharingEu) diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py index b94e7e5dc..30b5ac84f 100644 --- a/module/plugins/hoster/SecureUploadEu.py +++ b/module/plugins/hoster/SecureUploadEu.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class SecureUploadEu(XFSHoster): __name__ = "SecureUploadEu" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?secureupload\.eu/\w{12}' @@ -24,6 +24,3 @@ class SecureUploadEu(XFSHoster): PLUGIN_DOMAIN = "secureupload.eu" INFO_PATTERN = r'<h3>Downloading (?P<N>[^<]+) \((?P<S>[^<]+)\)</h3>' - - -getInfo = create_getInfo(SecureUploadEu) diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index 84a5949c6..cff63179e 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class SendspaceCom(SimpleHoster): __name__ = "SendspaceCom" __type__ = "hoster" - __version__ = "0.20" + __version__ = "0.21" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+' @@ -59,6 +59,3 @@ class SendspaceCom(SimpleHoster): self.retry_captcha() else: self.link = m.group(1) - - -getInfo = create_getInfo(SendspaceCom) diff --git a/module/plugins/hoster/Share4WebCom.py b/module/plugins/hoster/Share4WebCom.py index 5bd3e60da..5f2957b9c 100644 --- a/module/plugins/hoster/Share4WebCom.py +++ b/module/plugins/hoster/Share4WebCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.hoster.UnibytesCom import UnibytesCom, create_getInfo +from module.plugins.hoster.UnibytesCom import UnibytesCom class Share4WebCom(UnibytesCom): __name__ = "Share4WebCom" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?share4web\.com/get/\w+' @@ -18,6 +18,3 @@ class Share4WebCom(UnibytesCom): PLUGIN_DOMAIN = "share4web.com" - - -getInfo = create_getInfo(Share4WebCom) diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py index 427a2f925..1d2590193 100644 --- a/module/plugins/hoster/Share76Com.py +++ b/module/plugins/hoster/Share76Com.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class Share76Com(DeadHoster): __name__ = "Share76Com" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __status__ = "stable" __pattern__ = r'http://(?:www\.)?share76\.com/\w{12}' @@ -15,6 +15,3 @@ class Share76Com(DeadHoster): __description__ = """Share76.com hoster plugin""" __license__ = "GPLv3" __authors__ = [] - - -getInfo = create_getInfo(Share76Com) diff --git a/module/plugins/hoster/ShareFilesCo.py b/module/plugins/hoster/ShareFilesCo.py index ed24de6d4..a924b0bfe 100644 --- a/module/plugins/hoster/ShareFilesCo.py +++ b/module/plugins/hoster/ShareFilesCo.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class ShareFilesCo(DeadHoster): __name__ = "ShareFilesCo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?sharefiles\.co/\w{12}' @@ -15,6 +15,3 @@ class ShareFilesCo(DeadHoster): __description__ = """Sharefiles.co hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(ShareFilesCo) diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py index 38b1bcf33..178073941 100644 --- a/module/plugins/hoster/SharebeesCom.py +++ b/module/plugins/hoster/SharebeesCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class SharebeesCom(DeadHoster): __name__ = "SharebeesCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?sharebees\.com/\w{12}' @@ -15,6 +15,3 @@ class SharebeesCom(DeadHoster): __description__ = """ShareBees hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(SharebeesCom) diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 06c9f6cfe..72402a2af 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -6,7 +6,7 @@ import urllib from module.network.RequestFactory import getURL as get_url from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class ShareonlineBiz(SimpleHoster): @@ -68,7 +68,7 @@ class ShareonlineBiz(SimpleHoster): def handle_captcha(self): - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) m = re.search(r'var wait=(\d+);', self.data) @@ -103,8 +103,8 @@ class ShareonlineBiz(SimpleHoster): def check_download(self): - check = self.check_file({'cookie': re.compile(r'<div id="dl_failure"'), - 'fail' : re.compile(r"<title>Share-Online")}) + check = self.scan_download({'cookie': re.compile(r'<div id="dl_failure"'), + 'fail' : re.compile(r"<title>Share-Online")}) if check == "cookie": self.retry_captcha(5, 60, _("Cookie failure")) @@ -181,6 +181,3 @@ class ShareonlineBiz(SimpleHoster): else: self.wait(60, reconnect=True) self.restart(errmsg) - - -getInfo = create_getInfo(ShareonlineBiz) diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 126d441b9..75cd7ecfb 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster class ShareplaceCom(Hoster): __name__ = "ShareplaceCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __pattern__ = r'http://(?:www\.)?shareplace\.(com|org)/\?\w+' diff --git a/module/plugins/hoster/SharingmatrixCom.py b/module/plugins/hoster/SharingmatrixCom.py index 95264a55e..b51d19437 100644 --- a/module/plugins/hoster/SharingmatrixCom.py +++ b/module/plugins/hoster/SharingmatrixCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class SharingmatrixCom(DeadHoster): __name__ = "SharingmatrixCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "stable" __pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+' @@ -16,6 +16,3 @@ class SharingmatrixCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("jeix", "jeix@hasnomail.de"), ("paulking", None)] - - -getInfo = create_getInfo(SharingmatrixCom) diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index 61f7f427d..910925af5 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class ShragleCom(DeadHoster): __name__ = "ShragleCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "stable" __pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.+?)/' @@ -16,6 +16,3 @@ class ShragleCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org"), ("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(ShragleCom) diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index debf8c33d..835aa357e 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import seconds_to_midnight +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import seconds_to_midnight class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'https?://.+simply-premium\.com' @@ -81,6 +81,3 @@ class SimplyPremiumCom(MultiHoster): except AttributeError: self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url - - -getInfo = create_getInfo(SimplyPremiumCom) diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index c05cd197b..732c022fa 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import replace_patterns +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import replace_patterns class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __status__ = "testing" __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php' @@ -47,10 +47,7 @@ class SimplydebridCom(MultiHoster): def check_download(self): - if self.check_file({'error': "No address associated with hostname"}): + if self.scan_download({'error': "No address associated with hostname"}): self.retry(24, 3 * 60, _("Bad file downloaded")) return super(SimplydebridCom, self).check_download() - - -getInfo = create_getInfo(SimplydebridCom) diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py index 24a019f02..666cc7442 100644 --- a/module/plugins/hoster/SizedriveCom.py +++ b/module/plugins/hoster/SizedriveCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class SizedriveCom(SimpleHoster): __name__ = "SizedriveCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P<ID>\w+)' @@ -42,6 +42,3 @@ class SizedriveCom(SimpleHoster): m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.data) if m is not None: self.link = m.group(1) - - -getInfo = create_getInfo(SizedriveCom) diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index fbacac570..73dfd9caf 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.MultiHoster import MultiHoster +from module.plugins.internal.misc import json class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "testing" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate @@ -64,6 +64,3 @@ class SmoozedCom(MultiHoster): self.fail(_("Unable to initialize download")) else: self.link = header.get('location')[-1] if isinstance(header.get('location'), list) else header.get('location') - - -getInfo = create_getInfo(SmoozedCom) diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 4fd476122..4f880058d 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class SockshareCom(DeadHoster): __name__ = "SockshareCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "stable" __pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' @@ -17,6 +17,3 @@ class SockshareCom(DeadHoster): __authors__ = [("jeix", "jeix@hasnomail.de"), ("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] - - -getInfo = create_getInfo(SockshareCom) diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py index e9f7d4f68..b73198e9e 100644 --- a/module/plugins/hoster/SolidfilesCom.py +++ b/module/plugins/hoster/SolidfilesCom.py @@ -3,13 +3,13 @@ # Test links: # http://www.solidfiles.com/d/609cdb4b1b -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class SolidfilesCom(SimpleHoster): __name__ = "SolidfilesCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+' @@ -34,6 +34,3 @@ class SolidfilesCom(SimpleHoster): def setup(self): self.multiDL = True self.chunk_limit = 1 - - -getInfo = create_getInfo(SolidfilesCom) diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py index 258b63d75..6c74840f9 100644 --- a/module/plugins/hoster/SoundcloudCom.py +++ b/module/plugins/hoster/SoundcloudCom.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import json +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import json class SoundcloudCom(SimpleHoster): __name__ = "SoundcloudCom" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?soundcloud\.com/[\w\-]+/[\w\-]+' @@ -53,8 +53,5 @@ class SoundcloudCom(SimpleHoster): self.log_debug("Streams found: %s" % (http_streams or "None")) if http_streams: - stream_name, self.link = http_streams[0 if self.get_config('quality') == "Higher" else -1] + stream_name, self.link = http_streams[0 if self.config.get('quality') == "Higher" else -1] pyfile.name += '.' + stream_name.split('_')[1].lower() - - -getInfo = create_getInfo(SoundcloudCom) diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py index fdd743a65..b406eab68 100644 --- a/module/plugins/hoster/SpeedLoadOrg.py +++ b/module/plugins/hoster/SpeedLoadOrg.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class SpeedLoadOrg(DeadHoster): __name__ = "SpeedLoadOrg" __type__ = "hoster" - __version__ = "1.05" + __version__ = "1.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)' @@ -15,6 +15,3 @@ class SpeedLoadOrg(DeadHoster): __description__ = """Speedload.org hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(SpeedLoadOrg) diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py index e29f78650..5ea752d35 100644 --- a/module/plugins/hoster/SpeedfileCz.py +++ b/module/plugins/hoster/SpeedfileCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class SpeedfileCz(DeadHoster): __name__ = "SpeedFileCz" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "stable" __pattern__ = r'http://(?:www\.)?speedfile\.cz/.+' @@ -15,6 +15,3 @@ class SpeedfileCz(DeadHoster): __description__ = """Speedfile.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(SpeedfileCz) diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py index 6718ce797..a72fbe070 100644 --- a/module/plugins/hoster/SpeedyshareCom.py +++ b/module/plugins/hoster/SpeedyshareCom.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class SpeedyshareCom(SimpleHoster): __name__ = "SpeedyshareCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+' @@ -43,6 +43,3 @@ class SpeedyshareCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.link = m.group(1) - - -getInfo = create_getInfo(SpeedyshareCom) diff --git a/module/plugins/hoster/StahnuTo.py b/module/plugins/hoster/StahnuTo.py index 55e32246f..80a57bd03 100644 --- a/module/plugins/hoster/StahnuTo.py +++ b/module/plugins/hoster/StahnuTo.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class StahnuTo(DeadHoster): __name__ = "StahnuTo" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "stable" __pattern__ = r"http://(\w*\.)?stahnu.to/(files/get/|.*\?file=)([^/]+).*" @@ -15,6 +15,3 @@ class StahnuTo(DeadHoster): __description__ = """Stahnu.to hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", None)] - - -getInfo = create_getInfo(StahnuTo) diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index 379951f03..f0b8233b3 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class StorageTo(DeadHoster): __name__ = "StorageTo" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "stable" __pattern__ = r'http://(?:www\.)?storage\.to/get/.+' @@ -15,6 +15,3 @@ class StorageTo(DeadHoster): __description__ = """Storage.to hoster plugin""" __license__ = "GPLv3" __authors__ = [("mkaay", "mkaay@mkaay.de")] - - -getInfo = create_getInfo(StorageTo) diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index 5ed547159..0921b1878 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -6,24 +6,10 @@ from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster -def get_info(urls): - result = [] - - for url in urls: - html = get_url(url) - if re.search(StreamCz.OFFLINE_PATTERN, html): - #: File offline - result.append((url, 0, 1, url)) - else: - result.append((url, 0, 2, url)) - - yield result - - class StreamCz(Hoster): __name__ = "StreamCz" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+' diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py index b860c236b..84ba120af 100644 --- a/module/plugins/hoster/StreamcloudEu.py +++ b/module/plugins/hoster/StreamcloudEu.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class StreamcloudEu(XFSHoster): __name__ = "StreamcloudEu" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'http://(?:www\.)?streamcloud\.eu/\w{12}' @@ -32,6 +32,3 @@ class StreamcloudEu(XFSHoster): self.multiDL = True self.chunk_limit = 1 self.resume_download = self.premium - - -getInfo = create_getInfo(StreamcloudEu) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index 1490f5071..2cf9a80ad 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -1,23 +1,23 @@ # -*- coding: utf-8 -*- import binascii -import pycurl import random import re import time import urllib -from Crypto.Cipher import ARC4 +import Crypto.Cipher +import pycurl from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import timestamp +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import timestamp class TurbobitNet(SimpleHoster): __name__ = "TurbobitNet" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "broken" __pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)' @@ -79,7 +79,7 @@ class TurbobitNet(SimpleHoster): self.log_debug(inputs) if inputs['captcha_type'] == "recaptcha": - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(self.pyfile) inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge() else: m = re.search(self.CAPTCHA_PATTERN, self.data) @@ -99,12 +99,12 @@ class TurbobitNet(SimpleHoster): def get_rt_update(self): - rtUpdate = self.retrieve("rtUpdate") + rtUpdate = self.db.retrieve("rtUpdate") if rtUpdate: return rtUpdate - if self.retrieve("version") is not self.__version__ or \ - int(self.retrieve("timestamp", 0)) + 86400000 < timestamp(): + if self.db.retrieve("version") is not self.__version__ or \ + int(self.db.retrieve("timestamp", 0)) + 86400000 < timestamp(): #: that's right, we are even using jdownloader updates rtUpdate = self.load("http://update0.jdownloader.org/pluginstuff/tbupdate.js") rtUpdate = self.decrypt(rtUpdate.splitlines()[1]) @@ -113,9 +113,9 @@ class TurbobitNet(SimpleHoster): r'zza=\2;for(var zzi=0;zzi<zza.length;zzi++){\1=zza[zzi];', rtUpdate) rtUpdate = re.sub(r"for\((\w+)=", r"for(var \1=", rtUpdate) - self.store("rtUpdate", rtUpdate) - self.store("timestamp", timestamp()) - self.store("version", self.__version__) + self.db.store("rtUpdate", rtUpdate) + self.db.store("timestamp", timestamp()) + self.db.store("version", self.__version__) else: self.log_error(_("Unable to download, wait for update...")) self.temp_offline() @@ -152,7 +152,7 @@ class TurbobitNet(SimpleHoster): else: if self.retries >= 2: #: Retry with updated js - self.delete("rtUpdate") + self.db.delete("rtUpdate") else: self.retry() @@ -160,7 +160,7 @@ class TurbobitNet(SimpleHoster): def decrypt(self, data): - cipher = ARC4.new(binascii.hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) + cipher = Crypto.Cipher.ARC4.new(binascii.hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) return binascii.unhexlify(cipher.encrypt(binascii.unhexlify(data))) @@ -168,6 +168,3 @@ class TurbobitNet(SimpleHoster): lt = time.localtime() tz = time.altzone if lt.tm_isdst else time.timezone return "%s GMT%+03d%02d" % (time.strftime("%a %b %d %Y %H:%M:%S", lt), -tz // 3600, tz % 3600) - - -getInfo = create_getInfo(TurbobitNet) diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py index c71e20ce4..c03432354 100644 --- a/module/plugins/hoster/TurbouploadCom.py +++ b/module/plugins/hoster/TurbouploadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class TurbouploadCom(DeadHoster): __name__ = "TurbouploadCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "stable" __pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)' @@ -15,6 +15,3 @@ class TurbouploadCom(DeadHoster): __description__ = """Turboupload.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(TurbouploadCom) diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py index 3415a36ab..cbab4e856 100644 --- a/module/plugins/hoster/TusfilesNet.py +++ b/module/plugins/hoster/TusfilesNet.py @@ -2,13 +2,13 @@ from module.network.HTTPRequest import BadHeader from module.plugins.internal.Plugin import Retry -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class TusfilesNet(XFSHoster): __name__ = "TusfilesNet" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}' @@ -40,9 +40,6 @@ class TusfilesNet(XFSHoster): return super(TusfilesNet, self).download(url, *args, **kwargs) except BadHeader, e: - if e.code == 503: + if e.code is 503: self.multiDL = False raise Retry("503") - - -getInfo = create_getInfo(TusfilesNet) diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 389f78743..52846be9b 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class TwoSharedCom(SimpleHoster): __name__ = "TwoSharedCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' @@ -33,6 +33,3 @@ class TwoSharedCom(SimpleHoster): def setup(self): self.resume_download = True self.multiDL = True - - -getInfo = create_getInfo(TwoSharedCom) diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 0292871a7..1e9c2813d 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -3,8 +3,8 @@ import re import time -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import json, timestamp +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import json, timestamp def convert_decimal_prefix(m): @@ -15,7 +15,7 @@ def convert_decimal_prefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.18" + __version__ = "1.19" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)' @@ -126,7 +126,7 @@ class UlozTo(SimpleHoster): def check_download(self): - check = self.check_file({ + check = self.scan_download({ 'wrong_captcha': ">An error ocurred while verifying the user", 'offline' : re.compile(self.OFFLINE_PATTERN), 'passwd' : self.PASSWD_PATTERN, @@ -153,6 +153,3 @@ class UlozTo(SimpleHoster): self.fail(_("Server error, file not downloadable")) return super(UlozTo, self).check_download() - - -getInfo = create_getInfo(UlozTo) diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index 3a0288873..d48b73d58 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -3,13 +3,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UloziskoSk(SimpleHoster): __name__ = "UloziskoSk" __type__ = "hoster" - __version__ = "0.28" + __version__ = "0.29" __status__ = "testing" __pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+' @@ -72,6 +72,3 @@ class UloziskoSk(SimpleHoster): 'id' : id, 'name' : pyfile.name, 'but' : "++++STIAHNI+S%DABOR++++"}) - - -getInfo = create_getInfo(UloziskoSk) diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index 40e20beea..63c918da3 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -import pycurl import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UnibytesCom(SimpleHoster): __name__ = "UnibytesCom" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w\- .]{11}B' @@ -70,6 +69,3 @@ class UnibytesCom(SimpleHoster): elif last_step in ("captcha", "last"): post_data['captcha'] = self.captcha.decrypt(urlparse.urljoin(domain, "captcha.jpg")) - - -getInfo = create_getInfo(UnibytesCom) diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 2e9db1c3c..0c25860e1 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class UnrestrictLi(DeadHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+' @@ -15,6 +15,3 @@ class UnrestrictLi(DeadHoster): __description__ = """Unrestrict.li multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - - -getInfo = create_getInfo(UnrestrictLi) diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index c552adc0f..73be37213 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -3,7 +3,7 @@ import re import urlparse -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class UpleaCom(XFSHoster): @@ -67,6 +67,3 @@ class UpleaCom(XFSHoster): m = re.search(r".ulCounter\({'timer':(\d+)}\)", self.data) if m: self.wait(m.group(1)) - - -getInfo = create_getInfo(UpleaCom) diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py index 0681b3bfa..92a17be38 100644 --- a/module/plugins/hoster/UploadStationCom.py +++ b/module/plugins/hoster/UploadStationCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class UploadStationCom(DeadHoster): __name__ = "UploadStationCom" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __status__ = "stable" __pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P<ID>\w+)' @@ -16,6 +16,3 @@ class UploadStationCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es"), ("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(UploadStationCom) diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py index 0fc62777f..2122f7837 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/UploadableCh.py @@ -3,13 +3,13 @@ import re from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UploadableCh(SimpleHoster): __name__ = "UploadableCh" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)' @@ -48,7 +48,7 @@ class UploadableCh(SimpleHoster): b = self.load(pyfile.url, post={'checkDownload': "check"}) self.log_debug(b) #: Expected output: {'success': "showCaptcha"} - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) @@ -70,12 +70,9 @@ class UploadableCh(SimpleHoster): def check_download(self): - if self.check_file({'wait': re.compile("Please wait for")}): + if self.scan_download({'wait': re.compile("Please wait for")}): self.log_info(_("Downloadlimit reached, please wait or reconnect")) self.wait(60 * 60, True) self.retry() return super(UploadableCh, self).check_download() - - -getInfo = create_getInfo(UploadableCh) diff --git a/module/plugins/hoster/UploadboxCom.py b/module/plugins/hoster/UploadboxCom.py index 95a22c792..de8cfddd6 100644 --- a/module/plugins/hoster/UploadboxCom.py +++ b/module/plugins/hoster/UploadboxCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class UploadboxCom(DeadHoster): __name__ = "Uploadbox" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "stable" __pattern__ = r'http://(?:www\.)?uploadbox\.com/files/.+' @@ -15,6 +15,3 @@ class UploadboxCom(DeadHoster): __description__ = """UploadBox.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(UploadboxCom) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 9e7c0f6a1..06f5cb662 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -5,13 +5,13 @@ import time from module.network.RequestFactory import getURL as get_url from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.99" + __version__ = "1.00" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' @@ -75,7 +75,7 @@ class UploadedTo(SimpleHoster): self.data = self.load("http://uploaded.net/js/download.js") - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) response, challenge = recaptcha.challenge() self.data = self.load("http://uploaded.net/io/ticket/captcha/%s" % self.info['pattern']['ID'], @@ -85,6 +85,3 @@ class UploadedTo(SimpleHoster): super(UploadedTo, self).handle_free(pyfile) self.check_errors() - - -getInfo = create_getInfo(UploadedTo) diff --git a/module/plugins/hoster/UploadhereCom.py b/module/plugins/hoster/UploadhereCom.py index e684da0fb..1690ff0c9 100644 --- a/module/plugins/hoster/UploadhereCom.py +++ b/module/plugins/hoster/UploadhereCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class UploadhereCom(DeadHoster): __name__ = "UploadhereCom" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __status__ = "stable" __pattern__ = r'http://(?:www\.)?uploadhere\.com/\w{10}' @@ -15,6 +15,3 @@ class UploadhereCom(DeadHoster): __description__ = """Uploadhere.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(UploadhereCom) diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index 5ff34dc80..96d845259 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -6,13 +6,13 @@ import re import urlparse -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UploadheroCom(SimpleHoster): __name__ = "UploadheroCom" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" __status__ = "testing" __pattern__ = r'http://(?:www\.)?uploadhero\.com?/dl/\w+' @@ -70,6 +70,3 @@ class UploadheroCom(SimpleHoster): self.retry() return super(UploadheroCom, self).check_errors() - - -getInfo = create_getInfo(UploadheroCom) diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 0f779ffb2..f44fc9ea3 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -1,16 +1,17 @@ # -*- coding: utf-8 -*- -import pycurl import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from module.plugins.internal.utils import encode, json, timestamp +import pycurl + +from module.plugins.internal.SimpleHoster import SimpleHoster +from module.plugins.internal.misc import encode, json, timestamp class UploadingCom(SimpleHoster): __name__ = "UploadingCom" __type__ = "hoster" - __version__ = "0.46" + __version__ = "0.47" __status__ = "testing" __pattern__ = r'http://(?:www\.)?uploading\.com/files/(?:get/)?(?P<ID>\w+)' @@ -98,6 +99,3 @@ class UploadingCom(SimpleHoster): self.error(_("No URL")) self.link = url - - -getInfo = create_getInfo(UploadingCom) diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py index c565617fd..51843ed03 100644 --- a/module/plugins/hoster/UploadkingCom.py +++ b/module/plugins/hoster/UploadkingCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class UploadkingCom(DeadHoster): __name__ = "UploadkingCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "stable" __pattern__ = r'http://(?:www\.)?uploadking\.com/\w{10}' @@ -15,6 +15,3 @@ class UploadkingCom(DeadHoster): __description__ = """UploadKing.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - -getInfo = create_getInfo(UploadkingCom) diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 4fcf6dcfa..fbf03b7d3 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -3,7 +3,7 @@ import re from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UpstoreNet(SimpleHoster): @@ -43,7 +43,7 @@ class UpstoreNet(SimpleHoster): #: STAGE 2: solv captcha and wait #: First get the infos we need: recaptcha key and wait time - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) #: Try the captcha 5 times for i in xrange(5): @@ -85,8 +85,4 @@ class UpstoreNet(SimpleHoster): self.wantReconnect = True self.retry(wait_time=3600, reason=_("Upstore doesn't like us today")) - - - -getInfo = create_getInfo(UpstoreNet) diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py index 50e77c78a..4783adf8a 100644 --- a/module/plugins/hoster/UptoboxCom.py +++ b/module/plugins/hoster/UptoboxCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class UptoboxCom(XFSHoster): __name__ = "UptoboxCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}' @@ -36,6 +36,3 @@ class UptoboxCom(XFSHoster): self.multiDL = True self.chunk_limit = 1 self.resume_download = True - - -getInfo = create_getInfo(UptoboxCom) diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py index 1b07ffd6d..4c8f70ce3 100644 --- a/module/plugins/hoster/UserscloudCom.py +++ b/module/plugins/hoster/UserscloudCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class UserscloudCom(SimpleHoster): __name__ = "UserscloudCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?userscloud\.com/\w{12}' @@ -37,6 +37,3 @@ class UserscloudCom(SimpleHoster): def handle_free(self, pyfile): self.download(pyfile.url, post=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.data))) - - -getInfo = create_getInfo(UserscloudCom) diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index 30e7705aa..9999b9141 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster class VeehdCom(Hoster): __name__ = "VeehdCom" __type__ = "hoster" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __pattern__ = r'http://veehd\.com/video/\d+_\S+' @@ -61,12 +61,12 @@ class VeehdCom(Hoster): name = m.group(1) #: Replace unwanted characters in filename - if self.get_config('filename_spaces'): + if self.config.get('filename_spaces'): pattern = '[^\w ]+' else: pattern = '[^\w.]+' - return re.sub(pattern, self.get_config('replacement_char'), name) + '.avi' + return re.sub(pattern, self.config.get('replacement_char'), name) + '.avi' def get_file_url(self): diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py index e1d20da31..6f651b4a3 100644 --- a/module/plugins/hoster/VeohCom.py +++ b/module/plugins/hoster/VeohCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class VeohCom(SimpleHoster): __name__ = "VeohCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __status__ = "testing" __pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos)/(?P<ID>v\w+)' @@ -38,7 +38,7 @@ class VeohCom(SimpleHoster): def handle_free(self, pyfile): - quality = self.get_config('quality') + quality = self.config.get('quality') if quality == "Auto": quality = ("High", "Low") @@ -53,6 +53,3 @@ class VeohCom(SimpleHoster): self.log_info(_("No %s quality video found") % q.upper()) else: self.fail(_("No video found!")) - - -getInfo = create_getInfo(VeohCom) diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py index d883a5fdd..df2f1bdab 100644 --- a/module/plugins/hoster/VidPlayNet.py +++ b/module/plugins/hoster/VidPlayNet.py @@ -3,13 +3,13 @@ # Test links: # BigBuckBunny_320x180.mp4 - 61.7 Mb - http://vidplay.net/38lkev0h3jv0 -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class VidPlayNet(XFSHoster): __name__ = "VidPlayNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?vidplay\.net/\w{12}' @@ -27,6 +27,3 @@ class VidPlayNet(XFSHoster): PLUGIN_DOMAIN = "vidplay.net" NAME_PATTERN = r'<b>Password:</b></div>\s*<h[1-6]>(?P<N>[^<]+)</h[1-6]>' - - -getInfo = create_getInfo(VidPlayNet) diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 3e62a431a..6c659e2d7 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class VimeoCom(SimpleHoster): __name__ = "VimeoCom" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P<ID>\d+)' @@ -50,14 +50,14 @@ class VimeoCom(SimpleHoster): link = dict((l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html)) - if self.get_config('original'): + if self.config.get('original'): if "original" in link: self.link = link[q] return else: self.log_info(_("Original file not downloadable")) - quality = self.get_config('quality') + quality = self.config.get('quality') if quality == "Highest": qlevel = ("hd", "sd", "mobile") elif quality == "Lowest": @@ -73,6 +73,3 @@ class VimeoCom(SimpleHoster): self.log_info(_("No %s quality video found") % q.upper()) else: self.fail(_("No video found!")) - - -getInfo = create_getInfo(VimeoCom) diff --git a/module/plugins/hoster/Vipleech4UCom.py b/module/plugins/hoster/Vipleech4UCom.py index 96dff1a59..9133dbc97 100644 --- a/module/plugins/hoster/Vipleech4UCom.py +++ b/module/plugins/hoster/Vipleech4UCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class Vipleech4UCom(DeadHoster): __name__ = "Vipleech4UCom" __type__ = "hoster" - __version__ = "0.23" + __version__ = "0.24" __status__ = "stable" __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' @@ -15,6 +15,3 @@ class Vipleech4UCom(DeadHoster): __description__ = """Vipleech4u.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - - -getInfo = create_getInfo(Vipleech4UCom) diff --git a/module/plugins/hoster/VkCom.py b/module/plugins/hoster/VkCom.py index 858c0111c..58d465722 100644 --- a/module/plugins/hoster/VkCom.py +++ b/module/plugins/hoster/VkCom.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class VkCom(SimpleHoster): __name__ = "VkCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?vk\.com/video_ext\.php/\?.+" @@ -33,7 +33,4 @@ class VkCom(SimpleHoster): def handle_free(self, pyfile): - self.link = re.findall(self.LINK_FREE_PATTERN, self.data)[0 if self.get_config('quality') == "Low" else -1] - - -getInfo = create_getInfo(VkCom) + self.link = re.findall(self.LINK_FREE_PATTERN, self.data)[0 if self.config.get('quality') == "Low" else -1] diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index e8522096e..4e9d45daf 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class WarserverCz(DeadHoster): __name__ = "WarserverCz" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "stable" __pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+' @@ -15,6 +15,3 @@ class WarserverCz(DeadHoster): __description__ = """Warserver.cz hoster plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - -getInfo = create_getInfo(WarserverCz) diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index 7fe639335..b9c1274f5 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -3,13 +3,13 @@ import re from module.network.RequestFactory import getURL as get_url -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class WebshareCz(SimpleHoster): __name__ = "WebshareCz" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(en\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)' @@ -57,6 +57,3 @@ class WebshareCz(SimpleHoster): def handle_premium(self, pyfile): return self.handle_free(pyfile) - - -getInfo = create_getInfo(WebshareCz) diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 5c1a903a9..dc0646e4c 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -1,15 +1,16 @@ # -*- coding: utf-8 -*- -import pycurl import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +import pycurl + +from module.plugins.internal.SimpleHoster import SimpleHoster class WrzucTo(SimpleHoster): __name__ = "WrzucTo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))' @@ -36,7 +37,7 @@ class WrzucTo(SimpleHoster): def handle_free(self, pyfile): data = dict(re.findall(r'(md5|file): "(.*?)"', self.data)) - if len(data) != 2: + if len(data) is not 2: self.error(_("No file ID")) self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) @@ -47,10 +48,7 @@ class WrzucTo(SimpleHoster): self.data = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.data)) - if len(data) != 4: + if len(data) is not 4: self.error(_("No download URL")) self.link = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link']) - - -getInfo = create_getInfo(WrzucTo) diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 14d383e30..132a9da27 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class WuploadCom(DeadHoster): __name__ = "WuploadCom" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "stable" __pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?' @@ -16,6 +16,3 @@ class WuploadCom(DeadHoster): __license__ = "GPLv3" __authors__ = [("jeix", "jeix@hasnomail.de"), ("Paul King", None)] - - -getInfo = create_getInfo(WuploadCom) diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py index 85d260856..8d172ce77 100644 --- a/module/plugins/hoster/X7To.py +++ b/module/plugins/hoster/X7To.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class X7To(DeadHoster): __name__ = "X7To" __type__ = "hoster" - __version__ = "0.44" + __version__ = "0.45" __status__ = "stable" __pattern__ = r'http://(?:www\.)?x7\.to/' @@ -15,6 +15,3 @@ class X7To(DeadHoster): __description__ = """X7.to hoster plugin""" __license__ = "GPLv3" __authors__ = [("ernieb", "ernieb")] - - -getInfo = create_getInfo(X7To) diff --git a/module/plugins/hoster/XFileSharing.py b/module/plugins/hoster/XFileSharing.py index e0556789a..d225e73a2 100644 --- a/module/plugins/hoster/XFileSharing.py +++ b/module/plugins/hoster/XFileSharing.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster class XFileSharing(XFSHoster): __name__ = "XFileSharing" __type__ = "hoster" - __version__ = "0.63" + __version__ = "0.64" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -48,7 +48,7 @@ class XFileSharing(XFSHoster): def setup_base(self): if self.account: self.req = self.pyload.requestFactory.getRequest(self.PLUGIN_NAME, self.account.user) - self.premium = self.account.info['data']['premium'] #@NOTE: Avoid one unnecessary get_info call by `self.account.premium` here + self.premium = self.account.info['data']['premium'] #@NOTE: Don't call get_info here to reduce overhead else: self.req = self.pyload.requestFactory.getRequest(self.classname) self.premium = False @@ -62,6 +62,3 @@ class XFileSharing(XFSHoster): self.__class__.__name__ = str(self.PLUGIN_NAME) super(XFileSharing, self).load_account() self.__class__.__name__ = class_name - - -getInfo = create_getInfo(XFileSharing) diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index 56e61860a..d4b0c343e 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -3,7 +3,7 @@ import re import urllib -from module.plugins.internal.utils import json +from module.plugins.internal.misc import json from module.plugins.internal.Hoster import Hoster @@ -18,7 +18,7 @@ def clean_json(json_expr): class XHamsterCom(Hoster): __name__ = "XHamsterCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __pattern__ = r'http://(?:www\.)?xhamster\.com/movies/.+' @@ -36,8 +36,8 @@ class XHamsterCom(Hoster): if not self.file_exists(): self.offline() - if self.get_config('type'): - self.desired_fmt = self.get_config('type') + if self.config.get('type'): + self.desired_fmt = self.config.get('type') pyfile.name = self.get_file_name() + self.desired_fmt self.download(self.get_file_url()) diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py index e41433893..2347c8cfc 100644 --- a/module/plugins/hoster/XVideosCom.py +++ b/module/plugins/hoster/XVideosCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster class XVideosCom(Hoster): __name__ = "XVideos.com" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)' diff --git a/module/plugins/hoster/XdadevelopersCom.py b/module/plugins/hoster/XdadevelopersCom.py index 282a3cc06..843f835cf 100644 --- a/module/plugins/hoster/XdadevelopersCom.py +++ b/module/plugins/hoster/XdadevelopersCom.py @@ -5,13 +5,13 @@ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class XdadevelopersCom(SimpleHoster): __name__ = "XdadevelopersCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?forum\.xda-developers\.com/devdb/project/dl/\?id=\d+' @@ -39,6 +39,3 @@ class XdadevelopersCom(SimpleHoster): def handle_free(self, pyfile): self.link = pyfile.url + "&task=get" #@TODO: Revert to `get={'task': "get"}` in 0.4.10 - - -getInfo = create_getInfo(XdadevelopersCom) diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index cf512c7b4..4e29e2ea9 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -1,21 +1,20 @@ # -*- coding: utf-8 -*- import re +import select import socket import struct import sys import time -from select import select - from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import fs_join +from module.plugins.internal.misc import fsjoin -class Xdcc(Hoster): - __name__ = "Xdcc" +class XDCC(Hoster): + __name__ = "XDCC" __type__ = "hoster" - __version__ = "0.36" + __version__ = "0.37" __status__ = "testing" __config__ = [("nick", "str", "Nickname", "pyload"), @@ -49,7 +48,7 @@ class Xdcc(Hoster): else: errno = e.args[0] - if errno == 10054: + if errno is 10054: self.log_debug("Server blocked our ip, retry in 5 min") self.wait(300) continue @@ -67,15 +66,15 @@ class Xdcc(Hoster): chan = m.group(2) bot = m.group(3) pack = m.group(4) - nick = self.get_config('nick') - ident = self.get_config('ident') - real = self.get_config('realname') + nick = self.config.get('nick') + ident = self.config.get('ident') + real = self.config.get('realname') temp = server.split(':') ln = len(temp) - if ln == 2: + if ln is 2: host, port = temp - elif ln == 1: + elif ln is 1: host, port = temp[0], 6667 else: self.fail(_("Invalid hostname for IRC Server: %s") % server) @@ -119,7 +118,7 @@ class Xdcc(Hoster): sock.close() self.fail(_("XDCC Bot did not answer")) - fdset = select([sock], [], [], 0) + fdset = select.select([sock], [], [], 0) if sock not in fdset[0]: continue @@ -140,7 +139,7 @@ class Xdcc(Hoster): self.fail(_("IRC-Error: %s") % line) msg = line.split(None, 3) - if len(msg) != 4: + if len(msg) is not 4: continue msg = { @@ -189,7 +188,7 @@ class Xdcc(Hoster): self.pyfile.name = packname dl_folder = self.pyload.config.get("general", "download_folder") - filename = fs_join(dl_folder, packname) + filename = fsjoin(dl_folder, packname) self.log_info(_("Downloading %s from %s:%d") % (packname, ip, port)) diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index 9905a13d7..0ce46ce30 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -3,14 +3,14 @@ import re import random -from module.plugins.internal.utils import json -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.misc import json +from module.plugins.internal.SimpleHoster import SimpleHoster class YadiSk(SimpleHoster): __name__ = "YadiSk" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'https?://yadi\.sk/d/[\w\-]+' @@ -88,6 +88,3 @@ class YadiSk(SimpleHoster): except Exception: pass - - -getInfo = create_getInfo(YadiSk) diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index 2dbec6c09..9d6e28b79 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -3,14 +3,14 @@ import re import urlparse -from module.plugins.internal.utils import json -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.misc import json +from module.plugins.internal.SimpleHoster import SimpleHoster class YibaishiwuCom(SimpleHoster): __name__ = "YibaishiwuCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(?:u\.)?115\.com/file/(?P<ID>\w+)' @@ -61,6 +61,3 @@ class YibaishiwuCom(SimpleHoster): pass else: self.fail(_("No working link found")) - - -getInfo = create_getInfo(YibaishiwuCom) diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index 8c30f5707..aa07bb2db 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster class YoupornCom(Hoster): __name__ = "YoupornCom" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+' diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index 91d5cefa2..719c149a7 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster class YourfilesTo(Hoster): __name__ = "YourfilesTo" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "testing" __pattern__ = r'http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+' diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index f15df801a..81638e1ea 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -6,13 +6,13 @@ import subprocess import urllib from module.plugins.internal.Hoster import Hoster -from module.plugins.internal.utils import html_unescape, replace_patterns, which +from module.plugins.internal.misc import html_unescape, replace_patterns, which class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" - __version__ = "0.48" + __version__ = "0.49" __status__ = "testing" __pattern__ = r'https?://(?:[^/]*\.)?(youtu\.be/|youtube\.com/watch\?(?:.*&)?v=)\w+' @@ -76,7 +76,7 @@ class YoutubeCom(Hoster): self.temp_offline() #: Get config - use3d = self.get_config('3d') + use3d = self.config.get('3d') if use3d: quality = {'sd': 82, 'hd': 84, 'fullhd': 85, '240p': 83, '360p': 82, @@ -85,10 +85,10 @@ class YoutubeCom(Hoster): quality = {'sd': 18, 'hd': 22, 'fullhd': 37, '240p': 5, '360p': 18, '480p': 35, '720p': 22, '1080p': 37, '3072p': 38} - desired_fmt = self.get_config('fmt') + desired_fmt = self.config.get('fmt') if not desired_fmt: - desired_fmt = quality.get(self.get_config('quality'), 18) + desired_fmt = quality.get(self.config.get('quality'), 18) elif desired_fmt not in self.formats: self.log_warning(_("FMT %d unknown, using default") % desired_fmt) @@ -105,7 +105,7 @@ class YoutubeCom(Hoster): self.log_debug("AVAILABLE STREAMS: %s" % [x[0] for x in streams]) #: Build dictionary of supported itags (3D/2D) - allowed = lambda x: self.get_config(self.formats[x][0]) + allowed = lambda x: self.config.get(self.formats[x][0]) streams = [x for x in streams if x[0] in self.formats and allowed(x[0])] if not streams: @@ -171,4 +171,4 @@ class YoutubeCom(Hoster): "-acodec", "copy", filename]) - os.remove(inputfile) + self.remove(inputfile, trash=False) diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py index 866b9c84f..cfc374f6d 100644 --- a/module/plugins/hoster/ZDF.py +++ b/module/plugins/hoster/ZDF.py @@ -10,7 +10,7 @@ from module.plugins.internal.Hoster import Hoster class ZDF(Hoster): __name__ = "ZDF Mediathek" __type__ = "hoster" - __version__ = "0.87" + __version__ = "0.88" __status__ = "testing" __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py index 699adcc06..c46ac09ca 100644 --- a/module/plugins/hoster/ZShareNet.py +++ b/module/plugins/hoster/ZShareNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class ZShareNet(DeadHoster): __name__ = "ZShareNet" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __status__ = "stable" __pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+' @@ -16,6 +16,3 @@ class ZShareNet(DeadHoster): __license__ = "GPLv3" __authors__ = [("espes", None), ("Cptn Sandwich", None)] - - -getInfo = create_getInfo(ZShareNet) diff --git a/module/plugins/hoster/ZahikiNet.py b/module/plugins/hoster/ZahikiNet.py index ed45119e6..800cc0729 100644 --- a/module/plugins/hoster/ZahikiNet.py +++ b/module/plugins/hoster/ZahikiNet.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster class ZahikiNet(DeadHoster): __name__ = "ZahikiNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?zahiki\.net/\w+/.+' @@ -15,6 +15,3 @@ class ZahikiNet(DeadHoster): __description__ = """Zahiki.net hoster plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - -getInfo = create_getInfo(ZahikiNet) diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index ede1855c2..7747f494c 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -2,13 +2,13 @@ import re -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __type__ = "hoster" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+' @@ -30,6 +30,3 @@ class ZeveraCom(MultiHoster): def handle_premium(self, pyfile): self.link = "https://%s/getFiles.ashx?ourl=%s" % (self.account.PLUGIN_DOMAIN, pyfile.url) - - -getInfo = create_getInfo(ZeveraCom) diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 69fe38610..8026fc0ea 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -6,13 +6,13 @@ import urllib import BeautifulSoup from module.plugins.captcha.ReCaptcha import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" - __version__ = "0.85" + __version__ = "0.86" __status__ = "testing" __pattern__ = r'http://www\d{0,3}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)' @@ -30,9 +30,10 @@ class ZippyshareCom(SimpleHoster): COOKIES = [("zippyshare.com", "ziplocale", "en")] - NAME_PATTERN = r'(<title>Zippyshare.com - |"/)(?P<N>[^/]+)(</title>|";)' - SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.,]+) (?P<U>[\w^_]+)' - OFFLINE_PATTERN = r'does not exist (anymore )?on this server<' + NAME_PATTERN = r'(<title>Zippyshare.com - |"/)(?P<N>[^/]+)(</title>|";)' + SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.,]+) (?P<U>[\w^_]+)' + OFFLINE_PATTERN = r'does not exist (anymore )?on this server<' + TEMP_OFFLINE_PATTERN = None LINK_PREMIUM_PATTERN = r"document.location = '(.+?)'" @@ -44,7 +45,7 @@ class ZippyshareCom(SimpleHoster): def handle_free(self, pyfile): - recaptcha = ReCaptcha(self) + recaptcha = ReCaptcha(pyfile) captcha_key = recaptcha.detect_key() if captcha_key: @@ -94,6 +95,3 @@ class ZippyshareCom(SimpleHoster): #: Get the file's url by evaluating all the scripts scripts = ["var GVAR = {}"] + list(initScripts) + scripts + ['GVAR["dlbutton_href"]'] return self.js.eval('\n'.join(scripts)) - - -getInfo = create_getInfo(ZippyshareCom) |