diff options
| author | 2009-11-12 20:40:03 +0100 | |
|---|---|---|
| committer | 2009-11-12 20:40:03 +0100 | |
| commit | f8adcdf5a83f53e0d77af063973d1436976abd6f (patch) | |
| tree | 4e391701addc2cfaab68cee16b3a0b7f828f81ff /module/plugins | |
| parent | fixed python25 compatibility (diff) | |
| download | pyload-f8adcdf5a83f53e0d77af063973d1436976abd6f.tar.xz | |
shareonline.biz premium
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/ShareonlineBiz.py | 33 | 
1 files changed, 23 insertions, 10 deletions
| diff --git a/module/plugins/ShareonlineBiz.py b/module/plugins/ShareonlineBiz.py index 946c0f97d..cb7030e87 100644 --- a/module/plugins/ShareonlineBiz.py +++ b/module/plugins/ShareonlineBiz.py @@ -26,23 +26,36 @@ class ShareonlineBiz(Plugin):          self.html = [None, None]          self.want_reconnect = False          self.init_ocr() -        self.multi_dl = False +        if self.config['premium']: +            self.multi_dl = True +        else: +            self.multi_dl = False      def download_html(self): +        if self.config['premium']: +            post_vars = {"act": "login", +                         "location": "service.php", +                         "dieseid": "", +                         "user": self.config['username'], +                         "pass": self.config['password'], +                         "login":"Log+me+in", +                         "folder_autologin":"1"} +            self.req.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars)          url = self.parent.url          self.html[0] = self.req.load(url, cookies=True) -        captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name +        if not self.config['premium']: +            captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name -        for i in range(5): -            self.req.download("http://www.share-online.biz/captcha.php", captcha_image, cookies=True) -            captcha = self.ocr.get_captcha(captcha_image) -            self.html[1] = self.req.load(url, post={"captchacode": captcha}, cookies=True) -            if re.search(r"Der Download ist Ihnen zu langsam?", self.html[1]) != None: -                self.time_plus_wait = time() + 15 -                break +            for i in range(5): +                self.req.download("http://www.share-online.biz/captcha.php", captcha_image, cookies=True) +                captcha = self.ocr.get_captcha(captcha_image) +                self.html[1] = self.req.load(url, post={"captchacode": captcha}, cookies=True) +                if re.search(r"Der Download ist Ihnen zu langsam?", self.html[1]) != None: +                    self.time_plus_wait = time() + 15 +                    break -        os.remove(captcha_image) +            os.remove(captcha_image)      def get_file_url(self):          """ returns the absolute downloadable filepath | 
