summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/TnyCz.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/crypter/TnyCz.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/crypter/TnyCz.py')
-rw-r--r--module/plugins/crypter/TnyCz.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py
index 719c26449..f3fb19cb3 100644
--- a/module/plugins/crypter/TnyCz.py
+++ b/module/plugins/crypter/TnyCz.py
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
-
import re
+from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
+
class TnyCz(SimpleCrypter):
__name__ = "TnyCz"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.05"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?tny\.cz/\w+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -20,12 +21,12 @@ class TnyCz(SimpleCrypter):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- NAME_PATTERN = r'<title>(?P<N>.+) - .+</title>'
+ NAME_PATTERN = r'<title>(?P<N>.+?) - .+</title>'
- def getLinks(self):
+ def get_links(self):
m = re.search(r'<a id=\'save_paste\' href="(.+save\.php\?hash=.+)">', self.html)
- return re.findall(".+", self.load(m.group(1), decode=True)) if m else None
+ return re.findall(".+", self.load(m.group(1))) if m else None
getInfo = create_getInfo(TnyCz)