diff options
author | synweap15 <shamdog+github@gmail.com> | 2014-07-09 13:49:12 +0200 |
---|---|---|
committer | synweap15 <shamdog+github@gmail.com> | 2014-07-09 13:49:12 +0200 |
commit | 25d2cceff065a0268a7e183449ef54edf98f1783 (patch) | |
tree | d66e402f94b1bcb4340be94d4b9fd9e818b77808 /module/plugins | |
parent | remove blank lines and unused imports (diff) | |
download | pyload-25d2cceff065a0268a7e183449ef54edf98f1783.tar.xz |
simplify json loads, replace crypto with hashlib
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/accounts/RapideoPl.py | 11 | ||||
-rw-r--r-- | module/plugins/hooks/RapideoPl.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/RapideoPl.py | 6 |
3 files changed, 5 insertions, 19 deletions
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index 853731f26..6ace9ede0 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -1,16 +1,11 @@ # -*- coding: utf-8 -*- from datetime import datetime +import hashlib from module.plugins.Account import Account from time import mktime -import module.lib.beaker.crypto as crypto - -try: - from json import loads -except ImportError: - from simplejson import loads - +from module.common.json_layer import json_loads as loads class RapideoPl(Account): __name__ = "RapideoPl" @@ -60,7 +55,7 @@ class RapideoPl(Account): def login(self, user, data, req): self._usr = user - self._pwd = crypto.md5(data["password"]).hexdigest() + self._pwd = hashlib.md5(data["password"]).hexdigest() self._req = req try: response = loads(self.runAuthQuery()) diff --git a/module/plugins/hooks/RapideoPl.py b/module/plugins/hooks/RapideoPl.py index de1a80908..0c5327903 100644 --- a/module/plugins/hooks/RapideoPl.py +++ b/module/plugins/hooks/RapideoPl.py @@ -2,12 +2,7 @@ from module.plugins.internal.MultiHoster import MultiHoster from module.network.RequestFactory import getURL - -try: - from json import loads -except ImportError: - from simplejson import loads - +from module.common.json_layer import json_loads as loads class RapideoPl(MultiHoster): __name__ = "RapideoPl" diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 587b00bca..d64919ae0 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -1,10 +1,6 @@ # -*- coding: utf-8 -*- -try: - from json import loads, dumps -except ImportError: - from simplejson import loads - +from module.common.json_layer import json_loads as loads from module.plugins.internal.SimpleHoster import SimpleHoster |