summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/UploadheroCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 21:59:10 +0100
commit8e7d14bae4d3c836f029a1235eb227380acc3f75 (patch)
treeebd0679642cccb994e70a89a106b394189cb28bc /module/plugins/accounts/UploadheroCom.py
parentMerge branch 'stable' into 0.4.10 (diff)
downloadpyload-8e7d14bae4d3c836f029a1235eb227380acc3f75.tar.xz
Fix plugins to work on 0.4.10
Diffstat (limited to 'module/plugins/accounts/UploadheroCom.py')
-rw-r--r--module/plugins/accounts/UploadheroCom.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py
deleted file mode 100644
index c73fc30f5..000000000
--- a/module/plugins/accounts/UploadheroCom.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-import datetime
-import time
-
-from pyload.plugin.Account import Account
-
-
-class UploadheroCom(Account):
- __name__ = "UploadheroCom"
- __type__ = "account"
- __version__ = "0.21"
-
- __description__ = """Uploadhero.co account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("mcmyst", "mcmyst@hotmail.fr")]
-
-
- def loadAccountInfo(self, user, req):
- premium_pattern = re.compile('Il vous reste <span class="bleu">(\d+)</span> jours premium')
-
- data = self.getAccountData(user)
- html = req.load("http://uploadhero.co/my-account")
-
- if premium_pattern.search(html):
- end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(html).group(1)))
- end_date = time.mktime(future.timetuple())
- account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True}
- else:
- account_info = {"validuntil": -1, "trafficleft": -1, "premium": False}
-
- return account_info
-
-
- def login(self, user, data, req):
- html = req.load("http://uploadhero.co/lib/connexion.php",
- post={"pseudo_login": user, "password_login": data['password']},
- decode=True)
-
- if "mot de passe invalide" in html:
- self.wrongPassword()