From 97cf4aee358bf95d5e77b5efd4e9e470c9631185 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:00:09 +0100 Subject: [XFSPAccount] Improve VALID_UNTIL_PATTERN 2 --- module/plugins/internal/XFSPAccount.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/XFSPAccount.py') diff --git a/module/plugins/internal/XFSPAccount.py b/module/plugins/internal/XFSPAccount.py index ec62e5c1e..5f15a4659 100644 --- a/module/plugins/internal/XFSPAccount.py +++ b/module/plugins/internal/XFSPAccount.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSPAccount(Account): __name__ = "XFSPAccount" __type__ = "account" - __version__ = "0.19" + __version__ = "0.20" __description__ = """XFileSharingPro account plugin""" __license__ = "GPLv3" @@ -34,7 +34,7 @@ class XFSPAccount(Account): COOKIES = [(HOSTER_NAME, "lang", "english")] #: or list of tuples [(domain, name, value)] - VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire:.*?([^><]+)' + VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire:.*?(\d{2} [\w^_]+ \d{4})' TRAFFIC_LEFT_PATTERN = r'>Traffic available today:.*?\s*(?P[\d.,]+)\s*(?:(?P[\w^_]+)\s*)?' TRAFFIC_LEFT_UNIT = "MB" #: used only if no group was found @@ -70,7 +70,7 @@ class XFSPAccount(Account): try: validuntil = mktime(strptime(expiredate, "%d %B %Y")) except Exception, e: - self.logError(e) + self.logError(str(e)) else: if validuntil > mktime(gmtime()): premium = True -- cgit v1.2.3