summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/account/DepositfilesCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 19:58:02 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-03 19:58:02 +0200
commit43e6a6376625ac73067403ddae3b45a80618d6c8 (patch)
treeceb458c3da1f19e0a91731bc254ee3a158682d0b /pyload/plugins/account/DepositfilesCom.py
parent[ConfigParser] Remove IGNORE feature (diff)
downloadpyload-43e6a6376625ac73067403ddae3b45a80618d6c8.tar.xz
Rename accounts directory to account
Diffstat (limited to 'pyload/plugins/account/DepositfilesCom.py')
-rw-r--r--pyload/plugins/account/DepositfilesCom.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pyload/plugins/account/DepositfilesCom.py b/pyload/plugins/account/DepositfilesCom.py
new file mode 100644
index 000000000..9fc0772c4
--- /dev/null
+++ b/pyload/plugins/account/DepositfilesCom.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from time import strptime, mktime
+
+from pyload.plugins.base.Account import Account
+
+
+class DepositfilesCom(Account):
+ __name__ = "DepositfilesCom"
+ __type__ = "account"
+ __version__ = "0.3"
+
+ __description__ = """Depositfiles.com account plugin"""
+ __author_name__ = ("mkaay", "stickell", "Walter Purcaro")
+ __author_mail__ = ("mkaay@mkaay.de", "l.stickell@yahoo.it", "vuolter@gmail.com")
+
+
+ def loadAccountInfo(self, user, req):
+ src = req.load("https://dfiles.eu/de/gold/")
+ validuntil = re.search(r"Sie haben Gold Zugang bis: <b>(.*?)</b></div>", src).group(1)
+
+ validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S")))
+
+ return {"validuntil": validuntil, "trafficleft": -1}
+
+ def login(self, user, data, req):
+ src = req.load("https://dfiles.eu/de/login.php", get={"return": "/de/gold/payment.php"},
+ post={"login": user, "password": data['password']})
+ if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in src:
+ self.wrongPassword()