From de034056468bb5cea26351be1d76f01fd2826395 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 12 Oct 2012 23:53:45 +0200 Subject: Cleanup. --- module/plugins/accounts/OronCom.py | 54 -------------------------------------- 1 file changed, 54 deletions(-) delete mode 100755 module/plugins/accounts/OronCom.py (limited to 'module/plugins/accounts/OronCom.py') diff --git a/module/plugins/accounts/OronCom.py b/module/plugins/accounts/OronCom.py deleted file mode 100755 index 793984121..000000000 --- a/module/plugins/accounts/OronCom.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - @author: DHMH -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime - -class OronCom(Account): - __name__ = "OronCom" - __version__ = "0.12" - __type__ = "account" - __description__ = """oron.com account plugin""" - __author_name__ = ("DHMH") - __author_mail__ = ("DHMH@pyload.org") - - def loadAccountInfo(self, user, req): - req.load("http://oron.com/?op=change_lang&lang=german") - src = req.load("http://oron.com/?op=my_account").replace("\n", "") - validuntil = re.search(r"Premiumaccount läuft bis:\s*(.*?)", src) - if validuntil: - validuntil = validuntil.group(1) - validuntil = int(mktime(strptime(validuntil, "%d %B %Y"))) - trafficleft = re.search(r'Download Traffic verfügbar:\s*(.*?)', src).group(1) - self.logDebug("Oron left: " + trafficleft) - trafficleft = int(self.parseTraffic(trafficleft)) - premium = True - else: - validuntil = -1 - trafficleft = None - premium = False - tmp = {"validuntil": validuntil, "trafficleft": trafficleft, "premium" : premium} - return tmp - - def login(self, user, data, req): - req.load("http://oron.com/?op=change_lang&lang=german") - page = req.load("http://oron.com/login", post={"login": user, "password": data["password"], "op": "login"}) - if r'Login oder Passwort falsch' in page: - self.wrongPassword() -- cgit v1.2.3