summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/DdlstorageComFolder.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-06-22 20:39:19 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-06-22 20:39:19 +0200
commitcd1926a9be479e18d7782075c0687fd4733a93c3 (patch)
treea1804783685e0c233f7c5fd5df239a91b5442725 /module/plugins/crypter/DdlstorageComFolder.py
parentHotFolder: see (diff)
downloadpyload-cd1926a9be479e18d7782075c0687fd4733a93c3.tar.xz
DdlstogrageComFolder: fixed regex.
Now based on SimpleCrypter
Diffstat (limited to 'module/plugins/crypter/DdlstorageComFolder.py')
-rw-r--r--module/plugins/crypter/DdlstorageComFolder.py46
1 files changed, 22 insertions, 24 deletions
diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py
index d536032c6..d76988c92 100644
--- a/module/plugins/crypter/DdlstorageComFolder.py
+++ b/module/plugins/crypter/DdlstorageComFolder.py
@@ -1,32 +1,30 @@
# -*- 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
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero General Public License as #
+# published by the Free Software Foundation, either version 3 of the #
+# License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
-class DdlstorageComFolder(Crypter):
+from module.plugins.internal.SimpleCrypter import SimpleCrypter
+
+
+class DdlstorageComFolder(SimpleCrypter):
__name__ = "DdlstorageComFolder"
__type__ = "crypter"
__pattern__ = r"http://(?:\w*\.)*?ddlstorage.com/folder/\w{10}"
- __version__ = "0.01"
+ __version__ = "0.02"
__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/(.*)">'
+ __author_name__ = ("godofdream", "stickell")
+ __author_mail__ = ("soilfiction@gmail.com", "l.stickell@yahoo.it")
- 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')
+ LINK_PATTERN = '<a class="sub_title" style="text-decoration:none;" href="(http://www.ddlstorage.com/.*)">'