diff options
author | 2015-07-18 20:04:36 +0200 | |
---|---|---|
committer | 2015-07-18 20:04:36 +0200 | |
commit | 9e5d813d7721e351ac02ba72bdc473a7d77ba6b7 (patch) | |
tree | 1a5167cea6492283bfb679c4efdb4c13534d844f /module/plugins/crypter | |
parent | Reorder some functions (diff) | |
download | pyload-9e5d813d7721e351ac02ba72bdc473a7d77ba6b7.tar.xz |
Code cosmetics
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/DuckCryptInfo.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/HoerbuchIn.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 3 | ||||
-rw-r--r-- | module/plugins/crypter/SafelinkingNet.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/SexuriaCom.py | 4 |
5 files changed, 9 insertions, 10 deletions
diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 7541ac1a6..7dc0fc6bc 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from module.plugins.internal.Crypter import Crypter @@ -41,7 +41,7 @@ class DuckCryptInfo(Crypter): m = re.match(self.__pattern__, html) self.log_debug("Redirectet to " + str(m.group(0))) html = self.load(str(m.group(0))) - soup = BeautifulSoup(html) + soup = BeautifulSoup.BeautifulSoup(html) cryptlinks = soup.findAll("div", attrs={"class": "folderbox"}) self.log_debug("Redirectet to " + str(cryptlinks)) if not cryptlinks: diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index bf313dd99..1a897a3c1 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup +import BeautifulSoup from module.plugins.internal.Crypter import Crypter @@ -31,7 +31,7 @@ class HoerbuchIn(Crypter): if self.article.match(pyfile.url): html = self.load(pyfile.url) - soup = BeautifulSoup(html, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) + soup = BeautifulSoup.BeautifulSoup(html, convertEntities=BeautifulSoup.BeautifulStoneSoup.HTML_ENTITIES) abookname = soup.find("a", attrs={"rel": "bookmark"}).text for a in soup.findAll("a", attrs={"href": self.protection}): diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 01fb7bffc..b270ccbbd 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -252,8 +252,7 @@ class RelinkUs(Crypter): except Exception, detail: self.log_debug("Error decrypting Web link %s, %s" % (index, detail)) - self.set_wait(4) - self.wait() + self.wait(4) return package_links diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 973d62985..733e4c79e 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from module.common.json_layer import json_loads from module.plugins.internal.Crypter import Crypter @@ -66,7 +66,7 @@ class SafelinkingNet(Crypter): break pyfile.package().password = "" - soup = BeautifulSoup(self.html) + soup = BeautifulSoup.BeautifulSoup(self.html) scripts = soup.findAll("script") for s in scripts: if "d_links" in s.text: diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index db827ca27..0db90b73b 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -76,13 +76,13 @@ class SexuriaCom(Crypter): html = self.load(url) links = re.findall(self.PATTERN_REDIRECT_LINKS, html, re.I) if len(links) == 0: - self.log_error("Broken for link %s" % link) + self.log_error(_("Broken for link: %s") % link) else: for link in links: link = link.replace("http://sexuria.com/", "http://www.sexuria.com/") finallink = self.load(link, just_header=True)['location'] if not finallink or "sexuria.com/" in finallink: - self.log_error("Broken for link %s" % link) + self.log_error(_("Broken for link: %s") % link) else: linklist.append(finallink) |