From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- module/plugins/accounts/FilefactoryCom.py | 49 ------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 module/plugins/accounts/FilefactoryCom.py (limited to 'module/plugins/accounts/FilefactoryCom.py') diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py deleted file mode 100644 index 3395b3f90..000000000 --- a/module/plugins/accounts/FilefactoryCom.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pycurl import REFERER - -from pyload.plugin.Account import Account - - -class FilefactoryCom(Account): - __name__ = "FilefactoryCom" - __type__ = "account" - __version__ = "0.15" - - __description__ = """Filefactory.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] - - - VALID_UNTIL_PATTERN = r'Premium valid until: (?P\d{1,2})\w{1,2} (?P\w{3}), (?P\d{4})' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.filefactory.com/account/") - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - premium = True - validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g \g \g', m.group(0)) - validuntil = mktime(strptime(validuntil, "%d %b %Y")) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - - def login(self, user, data, req): - req.http.c.setopt(REFERER, "http://www.filefactory.com/member/login.php") - - html = req.load("http://www.filefactory.com/member/signin.php", - post={"loginEmail" : user, - "loginPassword": data['password'], - "Submit" : "Sign In"}) - - if req.lastEffectiveURL != "http://www.filefactory.com/account/": - self.wrongPassword() -- cgit v1.2.3