summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UnibytesCom.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/UnibytesCom.py
parentFix https://github.com/pyload/pyload/issues/1373 (diff)
downloadpyload-1ef93e913238275f7657d496ba3d2e7eeb5a30a2.tar.xz
Use 'import' instead 'from'
Diffstat (limited to 'module/plugins/hoster/UnibytesCom.py')
-rw-r--r--module/plugins/hoster/UnibytesCom.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index 14447b0b0..d090c8e7d 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
+import pycurl
import re
-
-from urlparse import urljoin
-
-from pycurl import FOLLOWLOCATION
+import urlparse
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -34,11 +32,11 @@ class UnibytesCom(SimpleHoster):
domain = "http://www.%s/" % self.HOSTER_DOMAIN
action, post_data = self.parseHtmlForm('id="startForm"')
- self.req.http.c.setopt(FOLLOWLOCATION, 0)
+ self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
for _i in xrange(8):
self.logDebug(action, post_data)
- self.html = self.load(urljoin(domain, action), post=post_data)
+ self.html = self.load(urlparse.urljoin(domain, action), post=post_data)
m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I)
if m:
@@ -66,12 +64,12 @@ class UnibytesCom(SimpleHoster):
self.wait(m.group(1) if m else 60, False)
elif last_step in ("captcha", "last"):
- post_data['captcha'] = self.decryptCaptcha(urljoin(domain, "/captcha.jpg"))
+ post_data['captcha'] = self.decryptCaptcha(urlparse.urljoin(domain, "/captcha.jpg"))
else:
self.fail(_("No valid captcha code entered"))
- self.req.http.c.setopt(FOLLOWLOCATION, 1)
+ self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1)
getInfo = create_getInfo(UnibytesCom)