diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
commit | 43e6a6376625ac73067403ddae3b45a80618d6c8 (patch) | |
tree | ceb458c3da1f19e0a91731bc254ee3a158682d0b /pyload/plugins/accounts/OneFichierCom.py | |
parent | [ConfigParser] Remove IGNORE feature (diff) | |
download | pyload-43e6a6376625ac73067403ddae3b45a80618d6c8.tar.xz |
Rename accounts directory to account
Diffstat (limited to 'pyload/plugins/accounts/OneFichierCom.py')
-rw-r--r-- | pyload/plugins/accounts/OneFichierCom.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/pyload/plugins/accounts/OneFichierCom.py b/pyload/plugins/accounts/OneFichierCom.py deleted file mode 100644 index efb563a60..000000000 --- a/pyload/plugins/accounts/OneFichierCom.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import strptime, mktime -from pycurl import REFERER - -from pyload.plugins.base.Account import Account - - -class OneFichierCom(Account): - __name__ = "OneFichierCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """1fichier.com account plugin""" - __author_name__ = "Elrick69" - __author_mail__ = "elrick69[AT]rocketmail[DOT]com" - - VALID_UNTIL_PATTERN = r'You are a premium user until (?P<d>\d{2})/(?P<m>\d{2})/(?P<y>\d{4})' - - - def loadAccountInfo(self, user, req): - - html = req.load("http://1fichier.com/console/abo.pl") - - m = re.search(self.VALID_UNTIL_PATTERN, html) - - if m: - premium = True - validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<d>/\g<m>/\g<y>', m.group(0)) - validuntil = int(mktime(strptime(validuntil, "%d/%m/%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://1fichier.com/login.pl?lg=en") - - html = req.load("http://1fichier.com/login.pl?lg=en", post={ - "mail": user, - "pass": data['password'], - "Login": "Login"}) - - if r'<div class="error_message">Invalid username or password.</div>' in html: - self.wrongPassword() |