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.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py
index 426d572db..e56708831 100644
--- a/module/plugins/accounts/FilefactoryCom.py
+++ b/module/plugins/accounts/FilefactoryCom.py
@@ -1,17 +1,16 @@
# -*- coding: utf-8 -*-
+import pycurl
import re
-from time import mktime, strptime
+import time
-from pycurl import REFERER
-
-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.16"
__description__ = """Filefactory.com account plugin"""
__license__ = "GPLv3"
@@ -29,7 +28,7 @@ class FilefactoryCom(Account):
if m:
premium = True
validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<D> \g<M> \g<Y>', m.group(0))
- validuntil = mktime(strptime(validuntil, "%d %b %Y"))
+ validuntil = time.mktime(time.strptime(validuntil, "%d %b %Y"))
else:
premium = False
validuntil = -1
@@ -38,9 +37,9 @@ class FilefactoryCom(Account):
def login(self, user, data, req):
- req.http.c.setopt(REFERER, "http://www.filefactory.com/member/login.php")
+ req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php")
- html = req.load("http://www.filefactory.com/member/signin.php",
+ html = req.load("https://www.filefactory.com/member/signin.php",
post={"loginEmail" : user,
"loginPassword": data['password'],
"Submit" : "Sign In"})