summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MegaNz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-08-01 19:35:59 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-08-01 19:35:59 +0200
commitba916633f2bedb04c7358000b91aed69f52e8e43 (patch)
tree5b0e323417bf2ac9f3d88b4234c7e8da98d30f5c /module/plugins/hoster/MegaNz.py
parent[DepositfilesCom] Fix missing declaration (thx hmlinaric) (diff)
downloadpyload-ba916633f2bedb04c7358000b91aed69f52e8e43.tar.xz
Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics
Diffstat (limited to 'module/plugins/hoster/MegaNz.py')
-rw-r--r--module/plugins/hoster/MegaNz.py16
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))