summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 15:34:19 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 15:34:19 +0100
commitd8771b13f1c658ac726ac93195a48ad87169eccd (patch)
treea81899c2905d59ff20341ffcad35c949d880a0b4 /module/plugins/accounts
parentTiny code cosmetics (diff)
parent[SkipRev] Tiny fixup (diff)
downloadpyload-d8771b13f1c658ac726ac93195a48ad87169eccd.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/hoster/NowDownloadEu.py module/plugins/hoster/NowDownloadSx.py module/plugins/hoster/NowVideoAt.py module/plugins/hoster/NowVideoSx.py pyload/plugins/account/RapidshareCom.py pyload/plugins/addon/ExtractArchive.py pyload/plugins/addon/HotFolder.py pyload/plugins/addon/UpdateManager.py pyload/plugins/hook/Captcha9kw.py pyload/plugins/hook/DebridItaliaCom.py pyload/plugins/hoster/DebridItaliaCom.py pyload/plugins/hoster/Keep2shareCc.py pyload/plugins/hoster/NetloadIn.py pyload/plugins/hoster/NowDownloadEu.py pyload/plugins/hoster/NowVideoAt.py pyload/plugins/hoster/RapidshareCom.py pyload/plugins/hoster/ShareonlineBiz.py pyload/plugins/internal/MultiHoster.py pyload/plugins/internal/SimpleHoster.py
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/RapiduNet.py45
-rw-r--r--module/plugins/accounts/SafesharingEu.py16
2 files changed, 61 insertions, 0 deletions
diff --git a/module/plugins/accounts/RapiduNet.py b/module/plugins/accounts/RapiduNet.py
new file mode 100644
index 000000000..2fabb6120
--- /dev/null
+++ b/module/plugins/accounts/RapiduNet.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Account import Account
+from module.common.json_layer import json_loads
+
+
+class RapiduNet(Account):
+ __name__ = "RapiduNet"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Rapidu.net account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("prOq", None)]
+
+
+ ACCOUNT_INFO_PATTERN = '<a href="premium/" style="padding-left: 0px;">Account: <b>(.*?)</b></a>'
+
+
+ def loadAccountInfo(self, user, req):
+ premium = False
+
+ req.load('https://rapidu.net/ajax.php?a=getChangeLang', post={"_go": "", "lang": "en"})
+ self.html = req.load('https://rapidu.net/', decode=True)
+
+ m = re.search(self.ACCOUNT_INFO_PATTERN, self.html)
+ if m:
+ if m.group(1) == "Premium":
+ premium = True
+
+ return {"validuntil": None, "trafficleft": None, "premium": premium}
+
+
+ def login(self, user, data, req):
+ try:
+ json = req.load('https://rapidu.net/ajax.php?a=getUserLogin', post={"_go": "", "login": user, "pass": data['password'], "member": "1"})
+ json = json_loads(json)
+ self.logDebug(json)
+
+ if not json['message'] == "success":
+ self.wrongPassword()
+ except Exception, e:
+ self.logError(e)
+
diff --git a/module/plugins/accounts/SafesharingEu.py b/module/plugins/accounts/SafesharingEu.py
new file mode 100644
index 000000000..2e58d33b3
--- /dev/null
+++ b/module/plugins/accounts/SafesharingEu.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.XFSAccount import XFSAccount
+
+
+class SafesharingEu(XFSAccount):
+ __name__ = "SafesharingEu"
+ __type__ = "account"
+ __version__ = "0.02"
+
+ __description__ = """Safesharing.eu account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("guidobelix", "guidobelix@hotmail.it")]
+
+
+ HOSTER_DOMAIN = "safesharing.eu"