diff options
Diffstat (limited to 'module/plugins/hoster/MegaRapidCz.py')
-rw-r--r-- | module/plugins/hoster/MegaRapidCz.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 13f462585..69c1c411b 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -22,7 +22,7 @@ def get_info(urls): class MegaRapidCz(SimpleHoster): __name__ = "MegaRapidCz" __type__ = "hoster" - __version__ = "0.57" + __version__ = "0.59" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+' @@ -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.user) - self.retry(wait_time=60, reason=_("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")) |