diff options
author | 2015-10-08 12:24:34 +0200 | |
---|---|---|
committer | 2015-10-08 12:24:34 +0200 | |
commit | c59aa4057608cd47084c66e41f363b5f981f2816 (patch) | |
tree | 73d787e55826537710ab526f583c46b0623c6c85 /module/plugins/hoster/GigapetaCom.py | |
parent | Spare improvements (diff) | |
download | pyload-c59aa4057608cd47084c66e41f363b5f981f2816.tar.xz |
Fixpack (5)
Diffstat (limited to 'module/plugins/hoster/GigapetaCom.py')
-rw-r--r-- | module/plugins/hoster/GigapetaCom.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 85e5e4843..da2f82f8f 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -34,26 +34,16 @@ class GigapetaCom(SimpleHoster): captcha_key = str(random.randint(1, 100000000)) captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) - self.check_errors() captcha = self.captcha.decrypt(captcha_url) - self.html = self.load(pyfile.url, post={ - 'captcha_key': captcha_key, - 'captcha': captcha, - 'download': "Download"}) - - m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) - if m is not None: - self.captcha.correct() - self.link = m.group(1) - - elif "Entered figures don`t coincide with the picture" in self.html: - self.retry_captcha() - + header = self.load(pyfile.url, + post={'captcha_key': captcha_key, + 'captcha' : captcha, + 'download' : "Download"}, + just_header=True) - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) + self.link = header.get('location') getInfo = create_getInfo(GigapetaCom) |