summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MegaRapidCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/MegaRapidCz.py')
-rw-r--r--module/plugins/hoster/MegaRapidCz.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py
index c3cf8a2b6..69c1c411b 100644
--- a/module/plugins/hoster/MegaRapidCz.py
+++ b/module/plugins/hoster/MegaRapidCz.py
@@ -54,15 +54,12 @@ class MegaRapidCz(SimpleHoster):
def handle_premium(self, pyfile):
m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
- if m:
+ if m is not None:
self.link = m.group(1)
- else:
- if re.search(self.ERR_LOGIN_PATTERN, self.html):
- self.relogin()
- self.retry(delay=60, msg=_("User login failed"))
- elif re.search(self.ERR_CREDIT_PATTERN, self.html):
- self.fail(_("Not enough credit left"))
+ elif re.search(self.ERR_LOGIN_PATTERN, self.html):
+ self.relogin()
+ self.retry(wait=60, msg=_("User login failed"))
- else:
- self.fail(_("Download link not found"))
+ elif re.search(self.ERR_CREDIT_PATTERN, self.html):
+ self.fail(_("Not enough credit left"))