From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/hoster/FiledropperCom.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/FiledropperCom.py') diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py index 3f5e2b761..8cef6c709 100644 --- a/module/plugins/hoster/FiledropperCom.py +++ b/module/plugins/hoster/FiledropperCom.py @@ -32,16 +32,14 @@ class FiledropperCom(SimpleHoster): def handle_free(self, pyfile): m = re.search(r'img id="img" src="(.+?)"', self.html) if m is None: - self.fail("Captcha not found") + self.fail(_("Captcha not found")) captcha_code = self.captcha.decrypt("http://www.filedropper.com/%s" % m.group(1)) m = re.search(r'method="post" action="(.+?)"', self.html) - if m is None: - self.fail("Download link not found") - - self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), - post={'code': captcha_code}) + if m is not None: + self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), + post={'code': captcha_code}) getInfo = create_getInfo(FiledropperCom) -- cgit v1.2.3