diff options
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)  | 
