From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/crypter/HoerbuchIn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/HoerbuchIn.py') diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index c6773b3f0..06a15fc65 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -28,7 +28,7 @@ class HoerbuchIn(Crypter): abookname = soup.find("a", attrs={"rel": "bookmark"}).text for a in soup.findAll("a", attrs={"href": self.protection}): package = "%s (%s)" % (abookname, a.previousSibling.previousSibling.text[:-1]) - links = self.decryptFolder(a["href"]) + links = self.decryptFolder(a['href']) self.packages.append((package, links, pyfile.package().folder)) else: -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/crypter/HoerbuchIn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/HoerbuchIn.py') diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index 06a15fc65..df81cc207 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -8,9 +8,11 @@ from module.lib.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup class HoerbuchIn(Crypter): __name__ = "HoerbuchIn" + __version__ = "0.6" __type__ = "crypter" + __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out.php\?.+|protection/folder_\d+\.html)' - __version__ = "0.6" + __description__ = """Hoerbuch.in decrypter plugin""" __author_name__ = ("spoob", "mkaay") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de") @@ -18,6 +20,7 @@ class HoerbuchIn(Crypter): article = re.compile("http://(?:www\.)?hoerbuch\.in/wp/horbucher/\d+/.+/") protection = re.compile("http://(?:www\.)?hoerbuch\.in/protection/folder_\d+.html") + def decrypt(self, pyfile): self.pyfile = pyfile -- cgit v1.2.3 From a1e78f33dc2b0b6777fdcbc415673f3965b25542 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 16 Jul 2014 00:46:26 +0200 Subject: Prefer self.urls and self.packages for adding links --- module/plugins/crypter/HoerbuchIn.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/HoerbuchIn.py') diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index df81cc207..b46293bc7 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -33,11 +33,9 @@ class HoerbuchIn(Crypter): package = "%s (%s)" % (abookname, a.previousSibling.previousSibling.text[:-1]) links = self.decryptFolder(a['href']) - self.packages.append((package, links, pyfile.package().folder)) + self.packages.append((package, links, package)) else: - links = self.decryptFolder(pyfile.url) - - self.packages.append((pyfile.package().name, links, pyfile.package().folder)) + self.urls = self.decryptFolder(pyfile.url) def decryptFolder(self, url): m = self.protection.search(url) -- cgit v1.2.3 From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/crypter/HoerbuchIn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/HoerbuchIn.py') diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index b46293bc7..88fc57244 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -39,7 +39,7 @@ class HoerbuchIn(Crypter): def decryptFolder(self, url): m = self.protection.search(url) - if not m: + if m is None: self.fail("Bad URL") url = m.group(0) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/crypter/HoerbuchIn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/HoerbuchIn.py') diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index 88fc57244..924ce5d3a 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -2,14 +2,15 @@ import re -from module.plugins.Crypter import Crypter from module.lib.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup +from module.plugins.Crypter import Crypter + class HoerbuchIn(Crypter): __name__ = "HoerbuchIn" - __version__ = "0.6" __type__ = "crypter" + __version__ = "0.6" __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out.php\?.+|protection/folder_\d+\.html)' -- cgit v1.2.3