summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar godofdream <soilfiction@gmail.com> 2012-08-06 20:40:05 +0200
committerGravatar godofdream <soilfiction@gmail.com> 2012-08-06 20:40:05 +0200
commit3493a84a357f49420997d6e5966e2018ff272235 (patch)
tree5ec8ceec7e6f46a14ed688e2c036e3b76fb10c8d /module
parentfast fix of error in BypassCaptcha (diff)
downloadpyload-3493a84a357f49420997d6e5966e2018ff272235.tar.xz
Added DdlStorage-folder support - closed #609, #573
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/DdlstorageComFolder.py32
-rw-r--r--module/plugins/hoster/DdlstorageCom.py6
2 files changed, 35 insertions, 3 deletions
diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py
new file mode 100644
index 000000000..d536032c6
--- /dev/null
+++ b/module/plugins/crypter/DdlstorageComFolder.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Crypter import Crypter
+from module.plugins.hoster.MediafireCom import checkHTMLHeader
+from module.common.json_layer import json_loads
+
+class DdlstorageComFolder(Crypter):
+ __name__ = "DdlstorageComFolder"
+ __type__ = "crypter"
+ __pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/folder/\w{10}"
+ __version__ = "0.01"
+ __description__ = """DDLStorage.com Folder Plugin"""
+ __author_name__ = ("godofdream")
+ __author_mail__ = ("soilfiction@gmail.com")
+
+ FILE_URL_PATTERN = '<a style="text-decoration:none;" href="http://www.ddlstorage.com/(.*)">'
+
+ def decrypt(self, pyfile):
+ new_links = []
+ # load and parse html
+ html = self.load(pyfile.url)
+ found = re.findall(self.FILE_URL_PATTERN, html)
+ self.logDebug(found)
+ for link in found:
+ # file page
+ new_links.append("http://www.ddlstorage.com/%s" % link)
+
+ if new_links:
+ self.core.files.addLinks(new_links, self.pyfile.package().id)
+ else:
+ self.fail('Could not extract any links')
diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py
index 31c4f4605..fc6c731b3 100644
--- a/module/plugins/hoster/DdlstorageCom.py
+++ b/module/plugins/hoster/DdlstorageCom.py
@@ -4,8 +4,8 @@ from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInf
class DdlstorageCom(XFileSharingPro):
__name__ = "DdlstorageCom"
__type__ = "hoster"
- __pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/\w{12}"
- __version__ = "0.01"
+ __pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/\w{12}(/?\w*)"
+ __version__ = "0.02"
__description__ = """DDLStorage.com hoster plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
@@ -13,4 +13,4 @@ class DdlstorageCom(XFileSharingPro):
def setup(self):
self.resumeDownload = self.multiDL = self.premium
-getInfo = create_getInfo(DdlstorageCom) \ No newline at end of file
+getInfo = create_getInfo(DdlstorageCom)