diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-08 01:49:36 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-08 01:49:36 +0100 |
commit | 84b12612e3498d8e3543b2f54bbe3b848ee83460 (patch) | |
tree | 55a62ef4c31082d46161c8c986d28363993fb635 | |
parent | [RapidgatorNet] Fix prepare routine (diff) | |
download | pyload-84b12612e3498d8e3543b2f54bbe3b848ee83460.tar.xz |
[XFSHoster] Improve ERROR_PATTERN
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index ecf1f9f97..84c8dfa91 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -16,7 +16,7 @@ from module.utils import html_unescape class XFSHoster(SimpleHoster): __name__ = "XFSHoster" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'^unmatchable$' @@ -36,7 +36,7 @@ class XFSHoster(SimpleHoster): INFO_PATTERN = r'<tr><td align=right><b>Filename:</b></td><td nowrap>(?P<N>[^<]+)</td></tr>\s*.*?<small>\((?P<S>[^<]+)\)</small>' NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"' - SIZE_PATTERN = r'You have requested .*\((?P<S>[\d\.\,]+) ?(?P<U>[\w^_]+)?\)</font>' + SIZE_PATTERN = r'You have requested .*\((?P<S>[\d.,]+) ?(?P<U>[\w^_]+)?\)</font>' OFFLINE_PATTERN = r'>\s*\w+ (Not Found|file (was|has been) removed)' TEMP_OFFLINE_PATTERN = r'>\s*\w+ server (is in )?(maintenance|maintainance)' @@ -51,7 +51,7 @@ class XFSHoster(SimpleHoster): RECAPTCHA_PATTERN = None SOLVEMEDIA_PATTERN = None - ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|<[Cc]enter><b>)(.+?)(?:["\']|</)' + ERROR_PATTERN = r'(?:class=["\']err["\'][^>]*>|<[Cc]enter><b>)(.+?)(?:["\']|</)|>\(ERROR:(.+?)\)' def setup(self): @@ -165,9 +165,14 @@ class XFSHoster(SimpleHoster): self.html = self.load(action, post=inputs) + self.checkErrors() + action, inputs = self.parseHtmlForm('F1') if not inputs: - self.error(_("TEXTAREA F1 not found")) + if self.errmsg: + self.retry(reason=self.errmsg) + else: + self.error(_("TEXTAREA F1 not found")) self.logDebug(inputs) @@ -239,7 +244,7 @@ class XFSHoster(SimpleHoster): self.fail(_("File too large for free download")) else: - self.fail(self.errmsg) + self.retry(wait_time=60, reason=self.errmsg) return self.errmsg |