summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/account/FilesMailRu.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/account/FilesMailRu.py')
-rw-r--r--pyload/plugin/account/FilesMailRu.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pyload/plugin/account/FilesMailRu.py b/pyload/plugin/account/FilesMailRu.py
new file mode 100644
index 000000000..e6afd0168
--- /dev/null
+++ b/pyload/plugin/account/FilesMailRu.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+from pyload.plugin.Account import Account
+
+
+class FilesMailRu(Account):
+ __name__ = "FilesMailRu"
+ __type__ = "account"
+ __version__ = "0.11"
+
+ __description__ = """Filesmail.ru account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("RaNaN", "RaNaN@pyload.org")]
+
+
+ def loadAccountInfo(self, user, req):
+ return {"validuntil": None, "trafficleft": None}
+
+
+ def login(self, user, data, req):
+ user, domain = user.split("@")
+
+ html = req.load("http://swa.mail.ru/cgi-bin/auth",
+ post={"Domain": domain,
+ "Login": user,
+ "Password": data['password'],
+ "Page": "http://files.mail.ru/"},
+ cookies=True,
+ decode=True)
+
+ if "Неверное имя пользователя или пароль" in html:
+ self.wrongPassword()