summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/account/FilesMailRu.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/account/FilesMailRu.py')
-rw-r--r--pyload/plugins/account/FilesMailRu.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/pyload/plugins/account/FilesMailRu.py b/pyload/plugins/account/FilesMailRu.py
new file mode 100644
index 000000000..bfd9d7ffb
--- /dev/null
+++ b/pyload/plugins/account/FilesMailRu.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+from pyload.plugins.internal.Account import Account
+
+
+class FilesMailRu(Account):
+ __name__ = "FilesMailRu"
+ __type__ = "account"
+ __version__ = "0.1"
+
+ __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("@")
+
+ page = req.load("http://swa.mail.ru/cgi-bin/auth", None,
+ {"Domain": domain, "Login": user, "Password": data['password'],
+ "Page": "http://files.mail.ru/"}, cookies=True)
+
+ if "Неверное имя пользователя или пароль" in page: # @TODO seems not to work
+ self.wrongPassword()