diff options
| author | 2010-11-02 19:29:14 +0100 | |
|---|---|---|
| committer | 2010-11-02 19:29:14 +0100 | |
| commit | 08cfe9a741bd8100d033bb7b569b0a119cf4715f (patch) | |
| tree | 17ac48e4f280f4674bf995fab449f835b5cb681b /module/plugins/hoster/ShareonlineBiz.py | |
| parent | files.mail.ru update (diff) | |
| download | pyload-08cfe9a741bd8100d033bb7b569b0a119cf4715f.tar.xz | |
share-online, try fix
Diffstat (limited to 'module/plugins/hoster/ShareonlineBiz.py')
| -rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 34 | 
1 files changed, 16 insertions, 18 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index a01dd86a3..95cedc140 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -83,27 +83,25 @@ class ShareonlineBiz(Hoster):                  self.wait()                  self.retry() -            return True -             -             -            # captcha = self.decryptCaptcha("http://www.share-online.biz/captcha.php", get={"rand":"0.%s" % random.randint(10**15,10**16)}, cookies=True) +            if "Captcha number error or expired" in html: +                captcha = self.decryptCaptcha("http://www.share-online.biz/captcha.php", get={"rand":"0.%s" % random.randint(10**15,10**16)}, cookies=True) +                     +                self.log.debug("%s Captcha: %s" % (self.__name__, captcha)) +                sleep(3) -            # self.log.debug("%s Captcha: %s" % (self.__name__, captcha)) -            # sleep(3) -             -            # html = self.load(self.pyfile.url, post={"captchacode": captcha}, cookies=True) -            # return True -             -             -            #m = re.search("var timeout='(\d+)';", self.html[1]) -            #self.waitUntil = time() + int(m.group(1)) if m else 30 -            # if r"Der Download ist Ihnen zu langsam" in html: -                # return True +                html = self.load(self.pyfile.url, post={"captchacode": captcha}, cookies=True) +                 +                if r"Der Download ist Ihnen zu langsam" not in html and r"The download is too slow for you" not in html: +                    self.fail("Plugin defect. Save dumps and report.") -            # if r"The download is too slow for you" in html: -                # return True +            m = re.search("var timeout='(\d+)';", self.html[1]) +            wait_time = int(m.group(1)) if m else 30 +            self.setWait(wait_time) +            self.log.debug("%s: Waiting %d seconds." % (self.__name__, wait_time)) +            self.wait() -            self.retry() +            return True +                      else:              if r"Die Nummer ist leider nicht richtig oder ausgelaufen!" in self.html:                  self.retry()  | 
