summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/_1FichierCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 03:25:42 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 03:25:42 +0100
commitea2d07843d369d8b8fd2aa02930bf549ce94a661 (patch)
treed74957918b4741e3a31c4ba007b23324e16bd53a /module/plugins/accounts/_1FichierCom.py
parent[SimpleHoster] Better checkDownload rules (diff)
downloadpyload-ea2d07843d369d8b8fd2aa02930bf549ce94a661.tar.xz
Spare fixes
Diffstat (limited to 'module/plugins/accounts/_1FichierCom.py')
-rw-r--r--module/plugins/accounts/_1FichierCom.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/module/plugins/accounts/_1FichierCom.py b/module/plugins/accounts/_1FichierCom.py
deleted file mode 100644
index 70bb3ec1c..000000000
--- a/module/plugins/accounts/_1FichierCom.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from time import strptime, mktime
-
-from pycurl import REFERER
-
-from module.plugins.Account import Account
-
-
-class _1FichierCom(Account):
- __name__ = "1FichierCom"
- __type__ = "account"
- __version__ = "0.12"
-
- __description__ = """1fichier.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Elrick69", "elrick69[AT]rocketmail[DOT]com"),
- ("Walter Purcaro", "vuolter@gmail.com")]
-
-
- VALID_UNTIL_PATTERN = r'Your Premium Status will end the (\d+/\d+/\d+)'
-
-
- def loadAccountInfo(self, user, req):
- validuntil = None
- trafficleft = -1
- premium = None
-
- html = req.load("https://1fichier.com/console/abo.pl")
-
- m = re.search(self.VALID_UNTIL_PATTERN, html)
- if m:
- expiredate = m.group(1)
- self.logDebug("Expire date: " + expiredate)
-
- try:
- validuntil = mktime(strptime(expiredate, "%d/%m/%Y"))
- except Exception, e:
- self.logError(e)
- else:
- premium = True
-
- return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium or False}
-
-
- def login(self, user, data, req):
- req.http.c.setopt(REFERER, "https://1fichier.com/login.pl?lg=en")
-
- html = req.load("https://1fichier.com/login.pl?lg=en",
- post={'mail' : user,
- 'pass' : data['password'],
- 'It' : "on",
- 'purge' : "off",
- 'valider': "Send"},
- decode=True)
-
- if '>Invalid email address' in html or '>Invalid password' in html:
- self.wrongPassword()