diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-20 23:26:51 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-20 23:26:51 +0100 |
commit | 69e45f0e3e3636e81efcee3b1be696cd6f2f3814 (patch) | |
tree | 31d9756a4332781e13aa5d93f3ee53b46e99240f /module | |
parent | [DevhostStFolder] Fixup (diff) | |
download | pyload-69e45f0e3e3636e81efcee3b1be696cd6f2f3814.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/LetitbitNet.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 6 |
2 files changed, 4 insertions, 12 deletions
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 273cea871..42adaee31 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -56,16 +56,6 @@ class LetitbitNet(SimpleHoster): self.resumeDownload = True - def getFileInfo(self): - api_rep = api_response(self.pyfile.url) - if api_rep['status'] == 'OK': - self.api_data = api_rep['data'][0] - self.pyfile.name = self.api_data['name'] - self.pyfile.size = self.api_data['size'] - else: - self.offline() - - def handleFree(self, pyfile): action, inputs = self.parseHtmlForm('id="ifree_form"') if not action: diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 035562962..3fd88bfb0 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -82,7 +82,7 @@ class UlozTo(SimpleHoster): else: self.handleFree(pyfile) - self.doCheckDownload() + self.checkFile() def handleFree(self, pyfile): @@ -124,7 +124,7 @@ class UlozTo(SimpleHoster): self.download(pyfile.url, get={'do': "directDownload"}, disposition=True) - def doCheckDownload(self): + def checkFile(self, rules={}): check = self.checkDownload({ "wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'), "offline" : re.compile(self.OFFLINE_PATTERN), @@ -154,5 +154,7 @@ class UlozTo(SimpleHoster): elif check == "not_found": self.fail(_("Server error - file not downloadable")) + return super(UlozTo, self).checkFile(rules) + getInfo = create_getInfo(UlozTo) |