summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/HoerbuchIn.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-21 15:03:21 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-21 15:03:21 +0200
commit4b61d36bf18931df0a9720047b3619ce245f8a1b (patch)
treefa6214ca6c85eb547dfe7de1ec7502ff3ce71793 /module/plugins/crypter/HoerbuchIn.py
parentNormalize line endings to avoid line endings merge conflicts (diff)
downloadpyload-4b61d36bf18931df0a9720047b3619ce245f8a1b.tar.xz
Fixed PEP 8 violations in Crypters
Diffstat (limited to 'module/plugins/crypter/HoerbuchIn.py')
-rw-r--r--module/plugins/crypter/HoerbuchIn.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py
index 4c26ba7f7..f8cb18b19 100644
--- a/module/plugins/crypter/HoerbuchIn.py
+++ b/module/plugins/crypter/HoerbuchIn.py
@@ -6,6 +6,7 @@ import re
from module.plugins.Crypter import Crypter
from module.lib.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup
+
class HoerbuchIn(Crypter):
__name__ = "HoerbuchIn"
__type__ = "container"
@@ -14,42 +15,42 @@ class HoerbuchIn(Crypter):
__description__ = """Hoerbuch.in Container Plugin"""
__author_name__ = ("spoob", "mkaay")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de")
-
+
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
-
+
if self.article.match(self.pyfile.url):
src = self.load(self.pyfile.url)
soup = BeautifulSoup(src, convertEntities=BeautifulStoneSoup.HTML_ENTITIES)
-
+
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"])
-
+
self.packages.append((package, links, self.pyfile.package().folder))
else:
links = self.decryptFolder(self.pyfile.url)
-
+
self.packages.append((self.pyfile.package().name, links, self.pyfile.package().folder))
-
+
def decryptFolder(self, url):
m = self.protection.search(url)
if not m:
self.fail("Bad URL")
url = m.group(0)
-
+
self.pyfile.url = url
src = self.req.load(url, post={"viewed": "adpg"})
-
+
links = []
pattern = re.compile("http://www\.hoerbuch\.in/protection/(\w+)/(.*?)\"")
for hoster, lid in pattern.findall(src):
self.req.lastURL = url
self.load("http://www.hoerbuch.in/protection/%s/%s" % (hoster, lid))
links.append(self.req.lastEffectiveURL)
-
+
return links