summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/LetitbitNetFolder.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-08 00:29:57 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-14 11:02:23 +0200
commit68d662e689cd42687341c550fb6ebb74e6968d21 (patch)
tree486cef41bd928b8db704894233b2cef94a6e346f /pyload/plugins/crypter/LetitbitNetFolder.py
parentsave_join -> safe_join & save_path -> safe_filename (diff)
downloadpyload-68d662e689cd42687341c550fb6ebb74e6968d21.tar.xz
module -> pyload
Diffstat (limited to 'pyload/plugins/crypter/LetitbitNetFolder.py')
-rw-r--r--pyload/plugins/crypter/LetitbitNetFolder.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pyload/plugins/crypter/LetitbitNetFolder.py b/pyload/plugins/crypter/LetitbitNetFolder.py
new file mode 100644
index 000000000..b03ea27b2
--- /dev/null
+++ b/pyload/plugins/crypter/LetitbitNetFolder.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import re
+from pyload.plugins.Crypter import Crypter
+
+
+class LetitbitNetFolder(Crypter):
+ __name__ = "LetitbitNetFolder"
+ __type__ = "crypter"
+ __version__ = "0.1"
+
+ __pattern__ = r'http://(?:www\.)?letitbit.net/folder/\w+'
+
+ __description__ = """Letitbit.net folder decrypter plugin"""
+ __author_name__ = ("DHMH", "z00nx")
+ __author_mail__ = ("webmaster@pcProfil.de", "z00nx0@gmail.com")
+
+ FOLDER_PATTERN = r'<table>(.*)</table>'
+ LINK_PATTERN = r'<a href="([^"]+)" target="_blank">'
+
+
+ def decrypt(self, pyfile):
+ html = self.load(pyfile.url)
+
+ folder = re.search(self.FOLDER_PATTERN, html, re.DOTALL)
+ if folder is None:
+ self.fail("Parse error (FOLDER)")
+
+ self.urls.extend(re.findall(self.LINK_PATTERN, folder.group(0)))
+
+ if not self.urls:
+ self.fail('Could not extract any links')