diff options
Diffstat (limited to 'module/plugins/hoster/ZeveraCom.py')
-rw-r--r-- | module/plugins/hoster/ZeveraCom.py | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py index 60fc2a12b..fb251142e 100644 --- a/module/plugins/hoster/ZeveraCom.py +++ b/module/plugins/hoster/ZeveraCom.py @@ -1,36 +1,34 @@ # -*- coding: utf-8 -*- +import re + +from urlparse import urljoin + from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.27" - __pattern__ = r'http://(?:www\.)?zevera\.com/.+' + __pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+' - __description__ = """Zevera.com hoster plugin""" + __description__ = """Zevera.com multi-hoster plugin""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - - def handlePremium(self): - if self.account.getAPIData(self.req, cmd="checklink", olink=self.pyfile.url) != "Alive": - self.fail(_("Offline or not downloadable")) + __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), + ("Walter Purcaro", "vuolter@gmail.com")] - header = self.account.getAPIData(self.req, just_header=True, cmd="generatedownloaddirect", olink=self.pyfile.url) - if not "location" in header: - self.fail(_("Unable to initialize download")) - self.link = header['location'] + def handlePremium(self, pyfile): + return "https://%s/getFiles.ashx?ourl=%s" % (self.account.HOSTER_DOMAIN, pyfile.url) def checkFile(self): - super(ZeveraCom, self).checkFile() + if self.checkDownload({"error": 'action="ErrorDownload.aspx'}): + self.fail(_("Error response received")) - if self.checkDownload({"error": 'action="ErrorDownload.aspx'}) is "error": - self.fail(_("Error response received - contact Zevera support")) + return super(ZeveraCom, self).checkFile() getInfo = create_getInfo(ZeveraCom) |