diff options
| author | 2013-07-22 20:50:34 +0200 | |
|---|---|---|
| committer | 2013-07-22 20:50:34 +0200 | |
| commit | 2edeee0532ec6d6b4b26fd045a5971f67ca455da (patch) | |
| tree | 8d656afc9c18f7dba7c05d6635f898fdf58d66d6 /module/plugins/hoster/FileApeCom.py | |
| parent | Fixed PEP 8 violations in Crypters (diff) | |
| download | pyload-2edeee0532ec6d6b4b26fd045a5971f67ca455da.tar.xz | |
Fixed PEP 8 violations in Hosters
Diffstat (limited to 'module/plugins/hoster/FileApeCom.py')
| -rw-r--r-- | module/plugins/hoster/FileApeCom.py | 29 | 
1 files changed, 16 insertions, 13 deletions
| diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index f5182a788..2ba01f3a0 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -5,6 +5,7 @@ import re  from module.plugins.Hoster import Hoster +  class FileApeCom(Hoster):      __name__ = "FileApeCom"      __type__ = "hoster" @@ -21,27 +22,29 @@ class FileApeCom(Hoster):          self.pyfile = pyfile          self.html = self.load(self.pyfile.url) -         +          if "This file is either temporarily unavailable or does not exist" in self.html:              self.offline() -         -        self.html = self.load(self.pyfile.url+"&g=1") -         + +        self.html = self.load(self.pyfile.url + "&g=1") +          continueMatch = re.search(r"window\.location = '(http://.*?)'", self.html)          if not continueMatch:              continueMatch = re.search(r"'(http://fileape\.com/\?act=download&t=[A-Za-z0-9_-]+)'", self.html)          if continueMatch:              continuePage = continueMatch.group(1)          else: -            self.fail("Plugin Defect")  -         +            self.fail("Plugin Defect") +          wait = 60 -        waitMatch = re.search("id=\"waitnumber\" style=\"font-size:2em; text-align:center; width:33px; height:33px;\">(\\d+)</span>", self.html) +        waitMatch = re.search( +            "id=\"waitnumber\" style=\"font-size:2em; text-align:center; width:33px; height:33px;\">(\\d+)</span>", +            self.html)          if waitMatch:              wait = int(waitMatch.group(1)) -        self.setWait(wait+3) +        self.setWait(wait + 3)          self.wait() -         +          self.html = self.load(continuePage)          linkMatch = \              re.search(r"<div style=\"text-align:center; font-size: 30px;\"><a href=\"(http://.*?)\"", self.html) @@ -51,12 +54,12 @@ class FileApeCom(Hoster):              link = linkMatch.group(1)          else:              self.fail("Plugin Defect") -         +          pyfile.name = link.rpartition('/')[2] -         +          self.download(link) -         +          check = self.checkDownload({"exp": "Download ticket expired"})          if check == "exp":              self.logInfo("Ticket expired, retrying...") -            self.retry()
\ No newline at end of file +            self.retry() | 
