diff options
author | 2013-07-22 20:50:34 +0200 | |
---|---|---|
committer | 2013-07-22 21:20:06 +0200 | |
commit | aaaf5a4cddec894aacd7400c59a9f2f5e710362f (patch) | |
tree | 9d9e89aff86598b3ffcc86117abd554b193e28b5 /pyload/plugins/hoster/MegacrypterCom.py | |
parent | implemented media type filter (diff) | |
download | pyload-aaaf5a4cddec894aacd7400c59a9f2f5e710362f.tar.xz |
Fixed PEP 8 violations in Hosters
(cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da)
Conflicts:
pyload/plugins/hoster/BasePlugin.py
pyload/plugins/hoster/MultishareCz.py
pyload/plugins/hoster/NetloadIn.py
pyload/plugins/hoster/PremiumizeMe.py
pyload/plugins/hoster/RapidshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/MegacrypterCom.py')
-rw-r--r-- | pyload/plugins/hoster/MegacrypterCom.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pyload/plugins/hoster/MegacrypterCom.py b/pyload/plugins/hoster/MegacrypterCom.py index 9f012e5be..f90174053 100644 --- a/pyload/plugins/hoster/MegacrypterCom.py +++ b/pyload/plugins/hoster/MegacrypterCom.py @@ -17,7 +17,6 @@ class MegacrypterCom(MegaNz): 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)) @@ -25,27 +24,20 @@ class MegacrypterCom(MegaNz): self.logDebug("API Response: " + resp) return json.loads(resp) - def process(self, pyfile): - - key = None - # match is guaranteed because plugin was chosen to handle url node = re.search(self.__pattern__, pyfile.url).group(1) - # get Mega.co.nz link info info = self.callApi(link=node, m="info") - + # get crypted file URL 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("#") - key = self.b64_decode(info["key"]) pyfile.name = info["name"] + self.FILE_SUFFIX @@ -55,5 +47,3 @@ class MegacrypterCom(MegaNz): # Everything is finished and final name can be set pyfile.name = info["name"] - - |