summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UlozTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-02 10:50:25 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-02 10:50:25 +0200
commitf5084f9c75e5fe1f86b3fc02408133a48b354863 (patch)
tree77258237a2919cd6423e42e38861456d3b937940 /module/plugins/hoster/UlozTo.py
parent[Account] Improve parse_traffic method + code cosmetics (diff)
downloadpyload-f5084f9c75e5fe1f86b3fc02408133a48b354863.tar.xz
Fix https://github.com/pyload/pyload/issues/1920
Diffstat (limited to 'module/plugins/hoster/UlozTo.py')
-rw-r--r--module/plugins/hoster/UlozTo.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index cc07770d4..b0df1d97f 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -4,6 +4,7 @@ import re
import time
from module.common.json_layer import json_loads
+from module.plugins.internal.Plugin import timestamp
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -68,13 +69,14 @@ class UlozTo(SimpleHoster):
self.log_debug('Using "new" version')
xapca = self.load("http://www.ulozto.net/reloadXapca.php",
- get={'rnd': str(int(time.time()))})
+ get={'rnd': timestamp()})
+
xapca = xapca.replace('sound":"', 'sound":"http:').replace('image":"', 'image":"http:')
- self.log_debug("xapca = %s" % xapca)
+ self.log_debug("xapca: %s" % xapca)
data = json_loads(xapca)
- captcha_value = self.captcha.decrypt(str(data['image']))
- self.log_debug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value)
+ captcha_value = self.captcha.decrypt(data['image'])
+ self.log_debug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: %s" % data['salt'], "CAPTCHA VALUE: " + captcha_value)
inputs.update({'timestamp': data['timestamp'], 'salt': data['salt'], 'hash': data['hash'], 'captcha_value': captcha_value})