summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MegacrypterCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-07 23:40:50 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-14 10:58:42 +0200
commit887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch)
treef31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/hoster/MegacrypterCom.py
parent[AccountManager] Fixed #733 (diff)
parent[File4safe] distributing LINK_PATTERN (diff)
downloadpyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/Account.py module/plugins/AccountManager.py module/plugins/Hook.py module/plugins/OCR.py module/plugins/Plugin.py module/plugins/PluginManager.py module/plugins/ReCaptcha.py module/plugins/accounts/Ftp.py module/plugins/accounts/Http.py module/plugins/internal/MultiHoster.py module/plugins/ocr/GigasizeCom.py module/plugins/ocr/LinksaveIn.py module/plugins/ocr/NetloadIn.py module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/hoster/MegacrypterCom.py')
-rw-r--r--module/plugins/hoster/MegacrypterCom.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py
index ee6be39a2..7a86dbf70 100644
--- a/module/plugins/hoster/MegacrypterCom.py
+++ b/module/plugins/hoster/MegacrypterCom.py
@@ -9,15 +9,18 @@ from module.plugins.hoster.MegaNz import MegaNz
class MegacrypterCom(MegaNz):
__name__ = "MegacrypterCom"
__type__ = "hoster"
- __pattern__ = r'(https?://[a-z0-9]{0,10}\.?megacrypter\.com/[a-zA-Z0-9!_\-]+)'
__version__ = "0.2"
+
+ __pattern__ = r'(https?://[a-z0-9]{0,10}\.?megacrypter\.com/[a-zA-Z0-9!_\-]+)'
+
__description__ = """Megacrypter.com decrypter plugin"""
- __author_name__ = ("GonzaloSR", )
- __author_mail__ = ("gonzalo@gonzalosr.com", )
+ __author_name__ = "GonzaloSR"
+ __author_mail__ = "gonzalo@gonzalosr.com"
API_URL = "http://megacrypter.com/api"
FILE_SUFFIX = ".crypted"
+
def callApi(self, **kwargs):
""" Dispatch a call to the api, see megacrypter.com/api_doc """
self.logDebug("JSON request: " + json_dumps(kwargs))
@@ -36,15 +39,15 @@ class MegacrypterCom(MegaNz):
dl = self.callApi(link=node, m="dl")
# TODO: map error codes, implement password protection
- # if info["pass"] == True:
- # crypted_file_key, md5_file_key = info["key"].split("#")
+ # if info['pass'] is True:
+ # crypted_file_key, md5_file_key = info['key'].split("#")
- key = self.b64_decode(info["key"])
+ key = self.b64_decode(info['key'])
- pyfile.name = info["name"] + self.FILE_SUFFIX
+ pyfile.name = info['name'] + self.FILE_SUFFIX
- self.download(dl["url"])
+ self.download(dl['url'])
self.decryptFile(key)
# Everything is finished and final name can be set
- pyfile.name = info["name"]
+ pyfile.name = info['name']