summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/GigapetaCom.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hoster/GigapetaCom.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/GigapetaCom.py')
-rw-r--r--module/plugins/hoster/GigapetaCom.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py
index c2feeb6f8..381c39a21 100644
--- a/module/plugins/hoster/GigapetaCom.py
+++ b/module/plugins/hoster/GigapetaCom.py
@@ -10,7 +10,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GigapetaCom(SimpleHoster):
__name__ = "GigapetaCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,27 +30,27 @@ class GigapetaCom(SimpleHoster):
COOKIES = [("gigapeta.com", "lang", "us")]
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
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)
for _i in xrange(5):
- self.checkErrors()
+ self.check_errors()
- captcha = self.decryptCaptcha(captcha_url)
+ captcha = self.captcha.decrypt(captcha_url)
self.html = self.load(pyfile.url, post={
- "captcha_key": captcha_key,
- "captcha": captcha,
- "download": "Download"})
+ 'captcha_key': captcha_key,
+ 'captcha': captcha,
+ 'download': "Download"})
m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I)
if m:
self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10
break
elif "Entered figures don&#96;t coincide with the picture" in self.html:
- self.invalidCaptcha()
+ self.captcha.invalid()
else:
self.fail(_("No valid captcha code entered"))