From 589121e80835c63aea0880a53c6678de5c31c16e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Mar 2015 01:59:01 +0100 Subject: Spare code cosmetics --- module/plugins/accounts/FilerNet.py | 2 +- module/plugins/accounts/FshareVn.py | 4 ++-- module/plugins/accounts/MegaRapidoNet.py | 14 +++++++------- module/plugins/accounts/MultishareCz.py | 2 +- module/plugins/accounts/UlozTo.py | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 4067445af..ac5fd11da 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -16,7 +16,7 @@ class FilerNet(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />' + TOKEN_PATTERN = r'_csrf_token" value="(.+?)" />' WALID_UNTIL_PATTERN = r'Der Premium-Zugang ist gültig bis (.+)\.\s*' TRAFFIC_PATTERN = r'Traffic\s*([^<]+)' FREE_PATTERN = r'Account Status\s*\s*Free' diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 0c76e2824..7fcf88f20 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -18,8 +18,8 @@ class FshareVn(Account): VALID_UNTIL_PATTERN = ur'
Thời hạn dùng:
\s*
([^<]+)
' - LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
[^<]+
' - TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*]*>([\d.]+) ([kKMG])B' + LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
.+?
' + TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*([\d.]+) ([kKMG])B' DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index 80e066244..d061d02bc 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -16,8 +16,8 @@ class MegaRapidoNet(Account): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - VALID_UNTIL_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?[\'"]premium_index[\'"][^>]*>[^<]*?<[^>]*?b[^>]*>\s*?TEMPO\s*?PREMIUM[^<]*<[^>]*?/b[^>]*>\s*?(\d*)[^\d]*?DIAS[^\d]*?(\d*)[^\d]*?HORAS[^\d]*?(\d*)[^\d]*?MINUTOS[^\d]*?(\d*)[^\d]*?SEGUNDOS' - USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'][^>]*>[^<]*<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'][^>]*>[^<]*<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' + VALID_UNTIL_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?[\'"]premium_index[\'"].*?>[^<]*?<[^>]*?b.*?>\s*?TEMPO\s*?PREMIUM.*?<[^>]*?/b.*?>\s*?(\d*)[^\d]*?DIAS[^\d]*?(\d*)[^\d]*?HORAS[^\d]*?(\d*)[^\d]*?MINUTOS[^\d]*?(\d*)[^\d]*?SEGUNDOS' + USER_ID_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']checkbox_compartilhar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']usar["\'].*?>.*?<\s*?input[^>]*?name\s*?=\s*?["\']user["\'][^>]*?value\s*?=\s*?["\'](.*?)\s*?["\']' def loadAccountInfo(self, user, req): @@ -50,8 +50,8 @@ class MegaRapidoNet(Account): if "sair" not in html.lower(): self.wrongPassword() else: - m = re.search(self.USER_ID_PATTERN, html) - if m: - data['uid'] = m.group(1) - else: - self.fail("Couldn't find the user ID") + m = re.search(self.USER_ID_PATTERN, html) + if m: + data['uid'] = m.group(1) + else: + self.fail("Couldn't find the user ID") diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py index 0ac764ee1..3488e3288 100644 --- a/module/plugins/accounts/MultishareCz.py +++ b/module/plugins/accounts/MultishareCz.py @@ -16,7 +16,7 @@ class MultishareCz(Account): TRAFFIC_LEFT_PATTERN = r'Kredit:\s*(?P[\d.,]+) (?P[\w^_]+)' - ACCOUNT_INFO_PATTERN = r'' + ACCOUNT_INFO_PATTERN = r'' def loadAccountInfo(self, user, req): diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 7236a4fa8..6ddb34385 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -18,7 +18,7 @@ class UlozTo(Account): ("pulpe", None)] - TRAFFIC_LEFT_PATTERN = r'