summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/MegaCoNzFolder.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/MegaCoNzFolder.py')
-rw-r--r--module/plugins/crypter/MegaCoNzFolder.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py
index bd135ac5f..107746819 100644
--- a/module/plugins/crypter/MegaCoNzFolder.py
+++ b/module/plugins/crypter/MegaCoNzFolder.py
@@ -2,15 +2,16 @@
import re
-from module.plugins.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter
class MegaCoNzFolder(Crypter):
__name__ = "MegaCoNzFolder"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.06"
+ __status__ = "testing"
- __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P<ID>[\w^_]+)!(?P<KEY>[\w,\\-]+)'
+ __pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#F!(?P<ID>[\w^_]+)!(?P<KEY>[\w,\\-]+)'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -26,7 +27,4 @@ class MegaCoNzFolder(Crypter):
def decrypt(self, pyfile):
url = "https://mega.co.nz/#F!%s!%s" % re.match(self.__pattern__, pyfile.url).groups()
self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url})
- self.urls = re.findall(r'(https://mega.co.nz/#N!.+?)<', self.html)
-
- if not self.urls: #@TODO: Remove in 0.4.10
- self.fail(_("No link grabbed"))
+ self.urls = re.findall(r'(https://mega(\.co)?\.nz/#N!.+?)<', self.html)