summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/account/DepositfilesCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/account/DepositfilesCom.py')
-rw-r--r--pyload/plugin/account/DepositfilesCom.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/pyload/plugin/account/DepositfilesCom.py b/pyload/plugin/account/DepositfilesCom.py
new file mode 100644
index 000000000..4e09ee2ed
--- /dev/null
+++ b/pyload/plugin/account/DepositfilesCom.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+import re
+import time
+
+from pyload.plugin.Account import Account
+
+
+class DepositfilesCom(Account):
+ __name = "DepositfilesCom"
+ __type = "account"
+ __version = "0.32"
+
+ __description = """Depositfiles.com account plugin"""
+ __license = "GPLv3"
+ __authors = [("mkaay", "mkaay@mkaay.de"),
+ ("stickell", "l.stickell@yahoo.it"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("https://dfiles.eu/de/gold/")
+ validuntil = re.search(r"Sie haben Gold Zugang bis: <b>(.*?)</b></div>", html).group(1)
+
+ validuntil = time.mktime(time.strptime(validuntil, "%Y-%m-%d %H:%M:%S"))
+
+ return {"validuntil": validuntil, "trafficleft": -1}
+
+
+ def login(self, user, data, req):
+ html = req.load("https://dfiles.eu/de/login.php", get={"return": "/de/gold/payment.php"},
+ post={"login": user, "password": data['password']},
+ decode=True)
+
+ if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in html:
+ self.wrongPassword()