From 670d3bffb19c3e1cc4be06a81165e055edeb1692 Mon Sep 17 00:00:00 2001
From: Walter Purcaro <vuolter@users.noreply.github.com>
Date: Sat, 30 May 2015 21:16:41 +0200
Subject: [MegaCoNz] Update __pattern__

---
 module/plugins/crypter/FurLy.py          | 2 +-
 module/plugins/crypter/MegaCoNzFolder.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'module/plugins/crypter')

diff --git a/module/plugins/crypter/FurLy.py b/module/plugins/crypter/FurLy.py
index dd907829b..b8e9332e2 100644
--- a/module/plugins/crypter/FurLy.py
+++ b/module/plugins/crypter/FurLy.py
@@ -12,7 +12,7 @@ class FurLy(SimpleCrypter):
 
     __description__ = """Fur.ly decrypter plugin"""
     __license__     = "GPLv3"
-    __authors__     = [("Walter Purcaro", "vuolter@gmail.com"  )]
+    __authors__     = [("Walter Purcaro", "vuolter@gmail.com")]
 
 
     URL_REPLACEMENTS = [(r'fur\.ly/', r'fur\.ly/bar/')]
diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py
index bd135ac5f..0c6f224a4 100644
--- a/module/plugins/crypter/MegaCoNzFolder.py
+++ b/module/plugins/crypter/MegaCoNzFolder.py
@@ -10,7 +10,7 @@ class MegaCoNzFolder(Crypter):
     __type__    = "crypter"
     __version__ = "0.04"
 
-    __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 +26,7 @@ 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)
+        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"))
-- 
cgit v1.2.3