diff options
author | 2014-09-07 23:40:50 +0200 | |
---|---|---|
committer | 2014-09-14 10:58:42 +0200 | |
commit | 887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch) | |
tree | f31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/crypter/HoerbuchIn.py | |
parent | [AccountManager] Fixed #733 (diff) | |
parent | [File4safe] distributing LINK_PATTERN (diff) | |
download | pyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/Account.py
module/plugins/AccountManager.py
module/plugins/Hook.py
module/plugins/OCR.py
module/plugins/Plugin.py
module/plugins/PluginManager.py
module/plugins/ReCaptcha.py
module/plugins/accounts/Ftp.py
module/plugins/accounts/Http.py
module/plugins/internal/MultiHoster.py
module/plugins/ocr/GigasizeCom.py
module/plugins/ocr/LinksaveIn.py
module/plugins/ocr/NetloadIn.py
module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/crypter/HoerbuchIn.py')
-rw-r--r-- | module/plugins/crypter/HoerbuchIn.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index c6773b3f0..924ce5d3a 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -2,15 +2,18 @@ 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" __type__ = "crypter" - __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out.php\?.+|protection/folder_\d+\.html)' __version__ = "0.6" + + __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out.php\?.+|protection/folder_\d+\.html)' + __description__ = """Hoerbuch.in decrypter plugin""" __author_name__ = ("spoob", "mkaay") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de") @@ -18,6 +21,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 @@ -28,17 +32,15 @@ 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)) + 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) - if not m: + if m is None: self.fail("Bad URL") url = m.group(0) |