From 52dafac35c3cbfd110746b981afd80da1632a373 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 19 Aug 2015 02:38:11 +0200 Subject: Spare plugin updates --- module/plugins/hoster/UploadheroCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UploadheroCom.py') diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index 2af0f32fc..ded0d60dd 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -44,7 +44,7 @@ class UploadheroCom(SimpleHoster): if m is None: self.error(_("Captcha not found")) - captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co", m.group(1))) + captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co/", m.group(1))) self.html = self.load(pyfile.url, get={'code': captcha}) @@ -58,7 +58,7 @@ class UploadheroCom(SimpleHoster): def check_errors(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) if m: - self.html = self.load(urlparse.urljoin("http://uploadhero.co", m.group(1))) + self.html = self.load(urlparse.urljoin("http://uploadhero.co/", m.group(1))) m = re.search(self.IP_WAIT_PATTERN, self.html) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 5 * 60 -- cgit v1.2.3 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/UploadheroCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/UploadheroCom.py') diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index ded0d60dd..517ed293a 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -50,14 +50,14 @@ class UploadheroCom(SimpleHoster): get={'code': captcha}) m = re.search(self.LINK_FREE_PATTERN, self.html) - if m: + if m is not None: self.link = m.group(1) or m.group(2) self.wait(50) def check_errors(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) - if m: + if m is not None: self.html = self.load(urlparse.urljoin("http://uploadhero.co/", m.group(1))) m = re.search(self.IP_WAIT_PATTERN, self.html) -- cgit v1.2.3