summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/MediafireComFolder.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/crypter/MediafireComFolder.py')
-rw-r--r--pyload/plugins/crypter/MediafireComFolder.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/pyload/plugins/crypter/MediafireComFolder.py b/pyload/plugins/crypter/MediafireComFolder.py
index f5f6389ef..43f87b821 100644
--- a/pyload/plugins/crypter/MediafireComFolder.py
+++ b/pyload/plugins/crypter/MediafireComFolder.py
@@ -7,18 +7,21 @@ from pyload.utils import json_loads
class MediafireComFolder(Crypter):
- __name__ = "MediafireComFolder"
- __type__ = "crypter"
+ __name__ = "MediafireComFolder"
+ __type__ = "crypter"
__version__ = "0.14"
__pattern__ = r'http://(?:www\.)?mediafire\.com/(folder/|\?sharekey=|\?\w{13}($|[/#]))'
+ __config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
+ ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
__description__ = """Mediafire.com folder decrypter plugin"""
- __authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
+ __license__ = "GPLv3"
+ __authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- FOLDER_KEY_PATTERN = r"var afI= '(\w+)';"
- FILE_URL_PATTERN = r'<meta property="og:url" content="http://www.mediafire.com/\?(\w+)"/>'
+ FOLDER_KEY_PATTERN = r'var afI= \'(\w+)'
+ LINK_PATTERN = r'<meta property="og:url" content="http://www\.mediafire\.com/\?(\w+)"/>'
def decrypt(self, pyfile):
@@ -28,7 +31,7 @@ class MediafireComFolder(Crypter):
if result == 0:
# load and parse html
html = self.load(pyfile.url)
- m = re.search(self.FILE_URL_PATTERN, html)
+ m = re.search(self.LINK_PATTERN, html)
if m:
# file page
self.urls.append("http://www.mediafire.com/file/%s" % m.group(1))
@@ -51,6 +54,3 @@ class MediafireComFolder(Crypter):
self.offline()
else:
self.urls.append(url)
-
- if not self.urls:
- self.fail('Could not extract any links')