diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-22 23:34:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-22 23:34:01 +0200 |
commit | c6809b5fdd2a8a5cf62d23be591e488dd9264281 (patch) | |
tree | 3f8b5dbbe0ab3532574201a53a9a74ec19b22fd7 | |
parent | [XFSHoster] Handle videoplayer (diff) | |
download | pyload-c6809b5fdd2a8a5cf62d23be591e488dd9264281.tar.xz |
Tiny code cosmetics
-rw-r--r-- | module/plugins/hoster/MegaRapidCz.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/WebshareCz.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 59fb8251e..e17dd4730 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -59,7 +59,9 @@ class MegaRapidCz(SimpleHoster): 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")) + else: self.fail(_("Download link not found")) diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py index 59f61dc87..ae670c8d4 100644 --- a/module/plugins/hoster/WebshareCz.py +++ b/module/plugins/hoster/WebshareCz.py @@ -51,10 +51,8 @@ class WebshareCz(SimpleHoster): self.logDebug("API data: " + api_data) m = re.search('<link>(.+)</link>', api_data) - if m is None: - self.error(_("Unable to detect direct link")) - - self.link = m.group(1) + if m: + self.link = m.group(1) def handlePremium(self, pyfile): |