summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/MultishareCz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
commitec6e5dc7fcdcefee10e37d22473c9accae1104cf (patch)
treed19824c0223b083d5b4256530443165cfabb7a04 /module/plugins/accounts/MultishareCz.py
parentMerge pull request #1850 from chaosblog/patch-2 (diff)
downloadpyload-ec6e5dc7fcdcefee10e37d22473c9accae1104cf.tar.xz
Account class completely rewritten + plugins updated
Diffstat (limited to 'module/plugins/accounts/MultishareCz.py')
-rw-r--r--module/plugins/accounts/MultishareCz.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py
index b1cbdea8a..62c149561 100644
--- a/module/plugins/accounts/MultishareCz.py
+++ b/module/plugins/accounts/MultishareCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account
class MultishareCz(Account):
__name__ = "MultishareCz"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__description__ = """Multishare.cz account plugin"""
@@ -19,8 +19,15 @@ class MultishareCz(Account):
TRAFFIC_LEFT_PATTERN = r'<span class="profil-zvyrazneni">Kredit:</span>\s*<strong>(?P<S>[\d.,]+)&nbsp;(?P<U>[\w^_]+)</strong>'
ACCOUNT_INFO_PATTERN = r'<input type="hidden" id="(u_ID|u_hash)" name=".+?" value="(.+?)">'
+ PLUGIN_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="(.+?)"></td>\s*<td class="stav">[^>]*?alt="OK"'
- def grab_info(self, user, password, data, req):
+
+ def grab_hosters(self, user, password, data):
+ html = self.load("http://www.multishare.cz/monitoring/")
+ return re.findall(self.PLUGIN_PATTERN, html)
+
+
+ def grab_info(self, user, password, data):
# self.relogin(user)
html = self.load("http://www.multishare.cz/profil/")
@@ -34,7 +41,7 @@ class MultishareCz(Account):
return dict(mms_info, **{'validuntil': -1, 'trafficleft': trafficleft})
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
html = self.load('https://www.multishare.cz/html/prihlaseni_process.php',
post={'akce' : "Přihlásit",
'heslo': password,