diff options
author | Christopher <4Christopher@gmx.de> | 2013-04-13 21:06:34 +0200 |
---|---|---|
committer | Christopher <4Christopher@gmx.de> | 2013-04-13 21:06:34 +0200 |
commit | 0b2e9ddcafed94fb780ea8d07ea23f6f14612830 (patch) | |
tree | 36f60fb82cc61cf17947cbe7dcbbc719994e234c /module/plugins/internal/SimpleCrypter.py | |
parent | Cleanup. (diff) | |
parent | MBLinkInfo: updated pattern (diff) | |
download | pyload-0b2e9ddcafed94fb780ea8d07ea23f6f14612830.tar.xz |
Merge branch 'stable' of git://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index b8942c724..c9e350e86 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -18,18 +18,20 @@ """ import re + from module.plugins.Crypter import Crypter + class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = None __type__ = "crypter" __description__ = """Base crypter plugin""" __author_name__ = ("stickell", "zoidberg") __author_mail__ = ("l.stickell@yahoo.it", "zoidberg@mujmail.cz") """ - These patterns should be defined by each hoster: + These patterns should be defined by each crypter: LINK_PATTERN: group(1) must be a download link example: <div class="link"><a href="(http://speedload.org/\w+) @@ -39,7 +41,7 @@ class SimpleCrypter(Crypter): """ def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.html = self.load(pyfile.url, decode=True) package_name, folder_name = self.getPackageNameAndFolder() @@ -55,7 +57,7 @@ class SimpleCrypter(Crypter): if hasattr(self, 'TITLE_PATTERN'): m = re.search(self.TITLE_PATTERN, self.html) if m: - name = folder = m.group('title') + name = folder = m.group('title').strip() self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder |