diff options
Diffstat (limited to 'module/plugins/hoster/UnibytesCom.py')
| -rw-r--r-- | module/plugins/hoster/UnibytesCom.py | 14 | 
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) | 
