From 1de45d9f4f2a39e205dd99e0dcf8b0c323537fea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 11 Dec 2014 17:08:29 +0100 Subject: Spare code cosmetics --- pyload/plugins/hoster/GigapetaCom.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'pyload/plugins/hoster/GigapetaCom.py') diff --git a/pyload/plugins/hoster/GigapetaCom.py b/pyload/plugins/hoster/GigapetaCom.py index 9bcd54dbc..06d3cc6cf 100644 --- a/pyload/plugins/hoster/GigapetaCom.py +++ b/pyload/plugins/hoster/GigapetaCom.py @@ -2,7 +2,6 @@ import re -from pycurl import FOLLOWLOCATION from random import randint from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -31,16 +30,15 @@ class GigapetaCom(SimpleHoster): captcha_key = str(randint(1, 100000000)) captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key - self.req.http.c.setopt(FOLLOWLOCATION, 0) - for _i in xrange(5): self.checkErrors() captcha = self.decryptCaptcha(captcha_url) - self.html = self.load(self.pyfile.url, post={ - "captcha_key": captcha_key, - "captcha": captcha, - "download": "Download"}) + self.html = self.load(self.pyfile.url, + post={'captcha_key': captcha_key, + 'captcha' : captcha, + 'download' : "Download"}, + follow_location=False) m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) if m: @@ -51,7 +49,6 @@ class GigapetaCom(SimpleHoster): else: self.fail(_("No valid captcha code entered")) - self.req.http.c.setopt(FOLLOWLOCATION, 1) self.download(download_url) -- cgit v1.2.3