From 004a80bfaad38f9400e8aebcb8f980353a232295 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Dec 2014 23:53:07 +0100 Subject: PEP-8, Python Zen, refactor and reduce code (thx FedeG) --- pyload/plugins/hook/BypassCaptcha.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyload/plugins/hook/BypassCaptcha.py') diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py index 112066353..26e6794c0 100644 --- a/pyload/plugins/hook/BypassCaptcha.py +++ b/pyload/plugins/hook/BypassCaptcha.py @@ -50,7 +50,7 @@ class BypassCaptcha(Hook): def getCredits(self): res = getURL(self.GETCREDITS_URL, post={"key": self.getConfig("passkey")}) - data = dict([x.split(' ', 1) for x in res.splitlines()]) + data = dict(x.split(' ', 1) for x in res.splitlines()) return int(data['Left']) @@ -70,7 +70,7 @@ class BypassCaptcha(Hook): finally: req.close() - data = dict([x.split(' ', 1) for x in res.splitlines()]) + data = dict(x.split(' ', 1) for x in res.splitlines()) if not data or "Value" not in data: raise BypassCaptchaException(res) -- cgit v1.2.3