diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-13 15:56:57 +0100 |
commit | acc46fc3497a66a427b795b4a22c6e71d69185a1 (patch) | |
tree | 2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugin/hoster/ZeveraCom.py | |
parent | Code fixes (diff) | |
download | pyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz |
Update
Diffstat (limited to 'pyload/plugin/hoster/ZeveraCom.py')
-rw-r--r-- | pyload/plugin/hoster/ZeveraCom.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pyload/plugin/hoster/ZeveraCom.py b/pyload/plugin/hoster/ZeveraCom.py new file mode 100644 index 000000000..3eeccc52c --- /dev/null +++ b/pyload/plugin/hoster/ZeveraCom.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +from pyload.plugin.Hoster import Hoster + + +class ZeveraCom(Hoster): + __name = "ZeveraCom" + __type = "hoster" + __version = "0.21" + + __pattern = r'http://(?:www\.)?zevera\.com/.*' + + __description = """Zevera.com hoster plugin""" + __license = "GPLv3" + __authors = [("zoidberg", "zoidberg@mujmail.cz")] + + + def setup(self): + self.resumeDownload = True + self.multiDL = True + self.chunkLimit = 1 + + + def process(self, pyfile): + if not self.account: + self.logError(_("Please enter your %s account or deactivate this plugin") % "zevera.com") + self.fail(_("No zevera.com account provided")) + + self.logDebug("Old URL: %s" % pyfile.url) + + if self.account.getAPIData(self.req, cmd="checklink", olink=pyfile.url) != "Alive": + self.fail(_("Offline or not downloadable - contact Zevera support")) + + header = self.account.getAPIData(self.req, just_header=True, cmd="generatedownloaddirect", olink=pyfile.url) + if not "location" in header: + self.fail(_("Unable to initialize download")) + + self.download(header['location'], disposition=True) + + check = self.checkDownload({"error": 'action="ErrorDownload.aspx'}) + if check == "error": + self.fail(_("Error response received - contact Zevera support")) |