diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 01:06:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 01:06:01 +0200 |
commit | 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 (patch) | |
tree | c52a2ab51763fce4a9b47d3c62388a27ebdeeda8 /module/plugins/crypter | |
parent | Fix https://github.com/pyload/pyload/issues/1373 (diff) | |
download | pyload-1ef93e913238275f7657d496ba3d2e7eeb5a30a2.tar.xz |
Use 'import' instead 'from'
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/CloudzillaToFolder.py | 3 | ||||
-rw-r--r-- | module/plugins/crypter/DailymotionComFolder.py | 5 | ||||
-rw-r--r-- | module/plugins/crypter/DevhostStFolder.py | 5 | ||||
-rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/Go4UpCom.py | 5 | ||||
-rw-r--r-- | module/plugins/crypter/MultiUpOrg.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/SafelinkingNet.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/TusfilesNetFolder.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/UploadedToFolder.py | 5 | ||||
-rw-r--r-- | module/plugins/crypter/YoutubeComFolder.py | 5 |
10 files changed, 17 insertions, 25 deletions
diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index 76019d928..96d7245f1 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py index 5c078000a..01caa0bb8 100644 --- a/module/plugins/crypter/DailymotionComFolder.py +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter @@ -24,7 +23,7 @@ class DailymotionComFolder(Crypter): def api_response(self, ref, req=None): - url = urljoin("https://api.dailymotion.com/", ref) + url = urlparse.urljoin("https://api.dailymotion.com/", ref) html = self.load(url, get=req) return json_loads(html) diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 5cafbf6b8..4d15e2058 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -4,8 +4,7 @@ # http://d-h.st/users/shine/?fld_id=37263#files import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -42,7 +41,7 @@ class DevhostStFolder(SimpleCrypter): p = r'href="(.+?)">Back to \w+<' m = re.search(p, self.html) - html = self.load(urljoin("http://d-h.st", m.group(1)), + html = self.load(urlparse.urljoin("http://d-h.st", m.group(1)), cookies=False) p = '\?fld_id=%s.*?">(.+?)<' % self.info['pattern']['ID'] diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 495efd706..a1a94b6f6 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -5,9 +5,9 @@ import binascii import re +import urlparse from Crypto.Cipher import AES -from urlparse import urljoin from module.plugins.Crypter import Crypter from module.plugins.internal.CaptchaService import ReCaptcha @@ -91,7 +91,7 @@ class FilecryptCc(Crypter): if m: #: normal captcha self.logDebug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)), + captcha_code = self.decryptCaptcha(urlparse.urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 6e7d09466..22f31f6f6 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -35,7 +34,7 @@ class Go4UpCom(SimpleCrypter): m = re.search(r'(/download/gethosts/.+?)"', self.html) if m: - self.html = self.load(urljoin("http://go4up.com/", m.group(1))) + self.html = self.load(urlparse.urljoin("http://go4up.com/", m.group(1))) pages = [self.load(url) for url in re.findall(self.LINK_PATTERN, self.html)] else: pages = [self.html] diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index 3f9e819eb..b676c3029 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import re -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -33,7 +33,7 @@ class MultiUpOrg(SimpleCrypter): pattern = r'style="width:97%;text-align:left".*\n.*href="(.*)"' if m_type == "download": dl_pattern = r'href="(.*)">.*\n.*<h5>DOWNLOAD</h5>' - miror_page = urljoin("http://www.multiup.org", re.search(dl_pattern, self.html).group(1)) + miror_page = urlparse.urljoin("http://www.multiup.org", re.search(dl_pattern, self.html).group(1)) self.html = self.load(miror_page) return re.findall(pattern, self.html) diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 34a45ea6e..7f0915065 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -2,8 +2,6 @@ import re -from pycurl import FOLLOWLOCATION - from BeautifulSoup import BeautifulSoup from module.common.json_layer import json_loads diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 47cc973f0..1cc505b81 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -2,7 +2,7 @@ import math import re -from urlparse import urljoin +import urlparse from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo @@ -28,7 +28,7 @@ class TusfilesNetFolder(XFSCrypter): def loadPage(self, page_n): - return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True) + return self.load(urlparse.urljoin(self.pyfile.url, str(page_n)), decode=True) def handlePages(self, pyfile): diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index b86c66bf7..d54ed47eb 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo @@ -31,7 +30,7 @@ class UploadedToFolder(SimpleCrypter): if m is None: self.error(_("PLAIN_PATTERN not found")) - plain_link = urljoin("http://uploaded.net/", m.group(1)) + plain_link = urlparse.urljoin("http://uploaded.net/", m.group(1)) return self.load(plain_link).split('\n')[:-1] diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index d7ca494fa..a2b02b2f1 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from urlparse import urljoin +import urlparse from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter @@ -31,7 +30,7 @@ class YoutubeComFolder(Crypter): def api_response(self, ref, req): req.update({"key": self.API_KEY}) - url = urljoin("https://www.googleapis.com/youtube/v3/", ref) + url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref) html = self.load(url, get=req) return json_loads(html) |