diff options
Diffstat (limited to 'module/plugins/hoster/MegaNz.py')
-rw-r--r-- | module/plugins/hoster/MegaNz.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/hoster/MegaNz.py b/module/plugins/hoster/MegaNz.py index cf35f2d2d..5562aad06 100644 --- a/module/plugins/hoster/MegaNz.py +++ b/module/plugins/hoster/MegaNz.py @@ -1,26 +1,25 @@ # -*- coding: utf-8 -*- -import re import random -from array import array -from os import remove -from base64 import standard_b64decode +import re from Crypto.Cipher import AES from Crypto.Util import Counter +from array import array +from base64 import standard_b64decode +from os import remove from module.common.json_layer import json_loads, json_dumps from module.plugins.Hoster import Hoster -#def getInfo(urls): -# pass - class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" - __pattern__ = r'https?://([a-z0-9]+\.)?mega\.co\.nz/#!([a-zA-Z0-9!_\-]+)' __version__ = "0.14" + + __pattern__ = r'https?://([a-z0-9]+\.)?mega\.co\.nz/#!([a-zA-Z0-9!_\-]+)' + __description__ = """Mega.co.nz hoster plugin""" __author_name__ = "RaNaN" __author_mail__ = "ranan@pyload.org" @@ -28,6 +27,7 @@ class MegaNz(Hoster): API_URL = "https://g.api.mega.co.nz/cs?id=%d" FILE_SUFFIX = ".crypted" + def b64_decode(self, data): data = data.replace("-", "+").replace("_", "/") return standard_b64decode(data + '=' * (-len(data) % 4)) |