summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/FilefactoryCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/FilefactoryCom.py')
-rw-r--r--module/plugins/accounts/FilefactoryCom.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py
index 37b6f97a8..e3d0c8491 100644
--- a/module/plugins/accounts/FilefactoryCom.py
+++ b/module/plugins/accounts/FilefactoryCom.py
@@ -4,13 +4,14 @@ import pycurl
import re
import time
-from module.plugins.Account import Account
+from module.plugins.internal.Account import Account
class FilefactoryCom(Account):
__name__ = "FilefactoryCom"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.17"
+ __status__ = "testing"
__description__ = """Filefactory.com account plugin"""
__license__ = "GPLv3"
@@ -21,8 +22,8 @@ class FilefactoryCom(Account):
VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<D>\d{1,2})\w{1,2} (?P<M>\w{3}), (?P<Y>\d{4})</strong>'
- def loadAccountInfo(self, user, req):
- html = req.load("http://www.filefactory.com/account/")
+ def parse_info(self, user, password, data, req):
+ html = self.load("http://www.filefactory.com/account/")
m = re.search(self.VALID_UNTIL_PATTERN, html)
if m:
@@ -33,16 +34,16 @@ class FilefactoryCom(Account):
premium = False
validuntil = -1
- return {"premium": premium, "trafficleft": -1, "validuntil": validuntil}
+ return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil}
- def login(self, user, data, req):
+ def login(self, user, password, data, req):
req.http.c.setopt(pycurl.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"})
+ html = self.load("https://www.filefactory.com/member/signin.php",
+ post={'loginEmail' : user,
+ 'loginPassword': password,
+ 'Submit' : "Sign In"})
if req.lastEffectiveURL != "http://www.filefactory.com/account/":
- self.wrongPassword()
+ self.login_fail()