diff options
author | Nitzo <nitzo2001@yahoo.com> | 2016-02-04 01:49:38 +0100 |
---|---|---|
committer | Nitzo <nitzo2001@yahoo.com> | 2016-02-04 01:49:38 +0100 |
commit | 81adf439529bcac03936fa35f3674cd5519bb58e (patch) | |
tree | 9bc226f6ba13ee0de8dcbc95c009853fc32b7c1b /module/plugins/internal | |
parent | [XFSHoster] Update (diff) | |
download | pyload-81adf439529bcac03936fa35f3674cd5519bb58e.tar.xz |
[XFSHoster] WAIT_PATTERN - use `parse_time` function
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index b10d178bb..ef71e944b 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -7,13 +7,13 @@ import re from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.captcha.SolveMedia import SolveMedia from module.plugins.internal.SimpleHoster import SimpleHoster -from module.plugins.internal.misc import html_unescape, seconds_to_midnight, set_cookie +from module.plugins.internal.misc import html_unescape, parse_time, seconds_to_midnight, set_cookie class XFSHoster(SimpleHoster): __name__ = "XFSHoster" __type__ = "hoster" - __version__ = "0.74" + __version__ = "0.75" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -195,7 +195,13 @@ class XFSHoster(SimpleHoster): if not self.premium: m = re.search(self.WAIT_PATTERN, self.data) if m is not None: - wait_time = int(m.group(1)) + try: + waitmsg = m.group(1).strip() + + except (AttributeError, IndexError): + waitmsg = m.group(0).strip() + + wait_time = parse_time(waitmsg) self.set_wait(wait_time) self.set_reconnect(False) self.handle_captcha(inputs) |