From acc46fc3497a66a427b795b4a22c6e71d69185a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 13 Dec 2014 15:56:57 +0100 Subject: Update --- pyload/plugins/account/FilerNet.py | 50 -------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 pyload/plugins/account/FilerNet.py (limited to 'pyload/plugins/account/FilerNet.py') diff --git a/pyload/plugins/account/FilerNet.py b/pyload/plugins/account/FilerNet.py deleted file mode 100644 index 36758f37d..000000000 --- a/pyload/plugins/account/FilerNet.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import time - -from pyload.plugins.Account import Account - - -class FilerNet(Account): - __name = "FilerNet" - __type = "account" - __version = "0.02" - - __description = """Filer.net account plugin""" - __license = "GPLv3" - __authors = [("stickell", "l.stickell@yahoo.it")] - - - 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' - - - def loadAccountInfo(self, user, req): - html = req.load("https://filer.net/profile") - - # Free user - if re.search(self.FREE_PATTERN, html): - return {"premium": False, "validuntil": None, "trafficleft": None} - - until = re.search(self.WALID_UNTIL_PATTERN, html) - traffic = re.search(self.TRAFFIC_PATTERN, html) - if until and traffic: - validuntil = int(time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S"))) - trafficleft = self.parseTraffic(traffic.group(1)) - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - else: - self.logError(_("Unable to retrieve account information")) - return {"premium": False, "validuntil": None, "trafficleft": None} - - - def login(self, user, data, req): - html = req.load("https://filer.net/login") - token = re.search(self.TOKEN_PATTERN, html).group(1) - html = req.load("https://filer.net/login_check", - post={"_username": user, "_password": data['password'], - "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"}) - if 'Logout' not in html: - self.wrongPassword() -- cgit v1.2.3