summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/DlProtectCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-14 03:51:26 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-12-27 20:54:33 +0100
commitb0b837650b2f3f85e9533e9cbc56d6140d1929a6 (patch)
tree3aff7a226f5f67e0550f9e2c09fa62add65906a0 /module/plugins/crypter/DlProtectCom.py
parentUpdate addons (diff)
downloadpyload-b0b837650b2f3f85e9533e9cbc56d6140d1929a6.tar.xz
Crypters version up
Diffstat (limited to 'module/plugins/crypter/DlProtectCom.py')
-rw-r--r--module/plugins/crypter/DlProtectCom.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py
index 874815eee..06904d593 100644
--- a/module/plugins/crypter/DlProtectCom.py
+++ b/module/plugins/crypter/DlProtectCom.py
@@ -1,18 +1,16 @@
# -*- coding: utf-8 -*-
+import base64
import re
import time
-import base64
-from base64 import urlsafe_b64encode
-
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class DlProtectCom(SimpleCrypter):
__name__ = "DlProtectCom"
__type__ = "crypter"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+'
@@ -31,6 +29,7 @@ class DlProtectCom(SimpleCrypter):
OFFLINE_PATTERN = r'Unfortunately, the link you are looking for is not found'
+
# Information decoding
# For test purposes
def info_decode(self, i):
@@ -72,7 +71,7 @@ class DlProtectCom(SimpleCrypter):
# Sample configuration
def conf(self):
- useragent = self.get_config('useragent', plugin="UserAgentSwitcher")
+ useragent = self.pyload.api.getConfigValue("UserAgentSwitcher", "useragent", "plugin")
conf = {'res': '1280x611x24',
'java': True,
'user_agent': useragent,
@@ -98,7 +97,7 @@ class DlProtectCom(SimpleCrypter):
else:
mstime = int(round(time.time() * 1000))
- b64time = "_" + urlsafe_b64encode(str(mstime)).replace("=", "%3D")
+ b64time = "_" + base64.urlsafe_b64encode(str(mstime)).replace("=", "%3D")
post_req.update({'i' : b64time,
'submitform': "Decrypt+link"})