diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-25 14:13:18 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-25 14:13:18 +0200 |
commit | 3be549693a8aaac758f0f1690eefe409e45c003f (patch) | |
tree | 26d733972cf89fd87e69dd97741b0276a31b8499 /module/plugins/hoster | |
parent | [UserAgentSwitcher] Fixup (2) (diff) | |
download | pyload-3be549693a8aaac758f0f1690eefe409e45c003f.tar.xz |
Some urljoin fixes
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/CrockoCom.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/NarodRu.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/UloziskoSk.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/YibaishiwuCom.py | 3 |
4 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 1d7468520..4f872f60a 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.plugins.internal.CaptchaService import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -38,8 +39,8 @@ class CrockoCom(SimpleHoster): for _i in xrange(5): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: - url, wait_time = 'http://crocko.com' + m.group(1), int(m.group(2)) - self.wait(wait_time) + url = urlparse.urljoin("http://crocko.com", m.group(1)) + self.wait(m.group(2)) self.html = self.load(url) else: break diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index b7380add0..c201ac250 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -2,6 +2,7 @@ import random import re +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -47,7 +48,7 @@ class NarodRu(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m: - self.link = 'http://narod.ru' + m.group(1) + self.link = urlparse.urljoin("http://narod.ru", m.group(1)) self.correctCaptcha() break diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index d687ae7cb..ad809b47c 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -55,8 +56,8 @@ class UloziskoSk(SimpleHoster): m = re.search(self.CAPTCHA_PATTERN, self.html) if m is None: self.error(_("CAPTCHA_PATTERN not found")) - captcha_url = 'http://www.ulozisko.sk' + m.group(1) + captcha_url = urlparse.urljoin("http://www.ulozisko.sk", m.group(1)) captcha = self.decryptCaptcha(captcha_url, cookies=True) self.logDebug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha) diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index 7ca6e1ac0..00185c05a 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import re +import urlparse from module.common.json_layer import json_loads from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -35,7 +36,7 @@ class YibaishiwuCom(SimpleHoster): self.logDebug(('FREEUSER' if m.group(2) == 'download' else 'GUEST') + ' URL', url) - res = json_loads(self.load("http://115.com" + url, decode=False)) + res = json_loads(self.load(urlparse.urljoin("http://115.com", url), decode=False)) if "urls" in res: mirrors = res['urls'] |