diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-07 23:40:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 10:58:42 +0200 |
commit | 887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch) | |
tree | f31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/accounts/ShareRapidCom.py | |
parent | [AccountManager] Fixed #733 (diff) | |
parent | [File4safe] distributing LINK_PATTERN (diff) | |
download | pyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/Account.py
module/plugins/AccountManager.py
module/plugins/Hook.py
module/plugins/OCR.py
module/plugins/Plugin.py
module/plugins/PluginManager.py
module/plugins/ReCaptcha.py
module/plugins/accounts/Ftp.py
module/plugins/accounts/Http.py
module/plugins/internal/MultiHoster.py
module/plugins/ocr/GigasizeCom.py
module/plugins/ocr/LinksaveIn.py
module/plugins/ocr/NetloadIn.py
module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/accounts/ShareRapidCom.py')
-rw-r--r-- | module/plugins/accounts/ShareRapidCom.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/module/plugins/accounts/ShareRapidCom.py b/module/plugins/accounts/ShareRapidCom.py index 38150e5cf..50077b1fb 100644 --- a/module/plugins/accounts/ShareRapidCom.py +++ b/module/plugins/accounts/ShareRapidCom.py @@ -1,49 +1,52 @@ # -*- coding: utf-8 -*- import re + from time import mktime, strptime from module.plugins.Account import Account class ShareRapidCom(Account): __name__ = "ShareRapidCom" - __version__ = "0.33" __type__ = "account" - __description__ = """ShareRapid account plugin""" + __version__ = "0.34" + + __description__ = """MegaRapid.cz account plugin""" __author_name__ = ("MikyWoW", "zoidberg") __author_mail__ = ("mikywow@seznam.cz", "zoidberg@mujmail.cz") login_timeout = 60 + def loadAccountInfo(self, user, req): - src = req.load("http://sharerapid.cz/mujucet/", decode=True) + src = req.load("http://megarapid.cz/mujucet/", decode=True) - found = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src) - if found: + m = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src) + if m: data = self.getAccountData(user) - data["options"]["limitDL"] = [int(found.group(1))] + data['options']['limitDL'] = [int(m.group(1))] - found = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src) - if found: - validuntil = mktime(strptime(found.group(1), "%d.%m.%Y - %H:%M")) + m = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src) + if m: + validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M")) return {"premium": True, "trafficleft": -1, "validuntil": validuntil} - found = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src) - if found: - trafficleft = float(found.group(1)) * (1 << 20) + m = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src) + if m: + trafficleft = float(m.group(1)) * (1 << 20) return {"premium": True, "trafficleft": trafficleft, "validuntil": -1} return {"premium": False, "trafficleft": None, "validuntil": None} def login(self, user, data, req): - htm = req.load("http://sharerapid.cz/prihlaseni/", cookies=True) + htm = req.load("http://megarapid.cz/prihlaseni/", cookies=True) if "Heslo:" in htm: start = htm.index('id="inp_hash" name="hash" value="') htm = htm[start + 33:] hashes = htm[0:32] - htm = req.load("http://sharerapid.cz/prihlaseni/", + htm = req.load("http://megarapid.cz/prihlaseni/", post={"hash": hashes, "login": user, - "pass1": data["password"], + "pass1": data['password'], "remember": 0, "sbmt": u"Přihlásit"}, cookies=True) |