| 23 | VALID_UNTIL_PATTERN = r'>Premium End:</td>\s*<td>([\d-]+)</td>' |
| 24 | |
| 25 | def grab_info(self, user, password, data): |
| 26 | html = self.load("https://www.extmatrix.com") |
| 27 | |
| 28 | premium = '>Premium Member<' in html |
| 29 | |
| 30 | m = re.search(self.VALID_UNTIL_PATTERN, html) |
| 31 | if m is not None: |
| 32 | validuntil = time.mktime(time.strptime(m.group(1) + " 23:59:59", '%d-%m-%Y %H:%M:%S')) |
| 33 | |
| 34 | else: |
| 35 | self.log_error(_("VALID_UNTIL_PATTERN not found")) |
| 36 | validuntil = None |
| 37 | |
| 38 | return {'validuntil': validuntil, |
| 39 | 'trafficleft': None, |
| 40 | 'premium': premium} |
| 41 | |
| 42 | def signin(self, user, password, data): |
| 43 | html = self.load("https://www.extmatrix.com/login.php") |