summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/GigapetaCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-01 01:06:01 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-01 01:06:01 +0200
commit1ef93e913238275f7657d496ba3d2e7eeb5a30a2 (patch)
treec52a2ab51763fce4a9b47d3c62388a27ebdeeda8 /module/plugins/hoster/GigapetaCom.py
parentFix https://github.com/pyload/pyload/issues/1373 (diff)
downloadpyload-1ef93e913238275f7657d496ba3d2e7eeb5a30a2.tar.xz
Use 'import' instead 'from'
Diffstat (limited to 'module/plugins/hoster/GigapetaCom.py')
-rw-r--r--module/plugins/hoster/GigapetaCom.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py
index 2fe44ca85..e4d0601fc 100644
--- a/module/plugins/hoster/GigapetaCom.py
+++ b/module/plugins/hoster/GigapetaCom.py
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
+import pycurl
+import random
import re
-from pycurl import FOLLOWLOCATION
-from random import randint
-
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -29,10 +28,10 @@ class GigapetaCom(SimpleHoster):
def handleFree(self, pyfile):
- captcha_key = str(randint(1, 100000000))
+ captcha_key = str(random.randint(1, 100000000))
captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key
- self.req.http.c.setopt(FOLLOWLOCATION, 0)
+ self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
for _i in xrange(5):
self.checkErrors()
@@ -52,7 +51,7 @@ class GigapetaCom(SimpleHoster):
else:
self.fail(_("No valid captcha code entered"))
- self.req.http.c.setopt(FOLLOWLOCATION, 1)
+ self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1)
def checkErrors(self):