diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-05 13:52:24 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-05 13:52:24 +0200 |
commit | 23a78c13c0176cc9db27135bc3620170f514a95f (patch) | |
tree | ca827b97d282d20c3bd509a008a1fa1213c1f472 /module/plugins/accounts | |
parent | config parser fix, UploadedTo premium working (diff) | |
download | pyload-23a78c13c0176cc9db27135bc3620170f514a95f.tar.xz |
RapidshareCom premium
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/RapidshareCom.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/accounts/RapidshareCom.py b/module/plugins/accounts/RapidshareCom.py index 016c084c9..c0974dab4 100644 --- a/module/plugins/accounts/RapidshareCom.py +++ b/module/plugins/accounts/RapidshareCom.py @@ -27,16 +27,16 @@ class RapidshareCom(Account): __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - def getAccountInfo(self, name): - req = self.core.requestFactory.getRequest(self.__name__, name) + def getAccountInfo(self, user): data = None - for account in self.accounts: - if account[0] == name: - data = account + for account in self.accounts.items(): + if account[0] == user: + data = account[1] if not data: return + req = self.core.requestFactory.getRequest(self.__name__, user) api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": data[0], "password": data[1], "withcookie": 1} + api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": user, "password": data["password"], "withcookie": 1} src = req.load(api_url_base, cookies=False, get=api_param_prem) if src.startswith("ERROR"): return @@ -52,10 +52,10 @@ class RapidshareCom(Account): return out def login(self): - for account in self.accounts: - req = self.core.requestFactory.getRequest(self.__name__, account[0]) + for user, data in self.accounts.items(): + req = self.core.requestFactory.getRequest(self.__name__, user) api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": account[0], "password": account[1], "withcookie": 1} + api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": user, "password": data["password"], "withcookie": 1} src = req.load(api_url_base, cookies=False, get=api_param_prem) if src.startswith("ERROR"): return @@ -66,7 +66,7 @@ class RapidshareCom(Account): continue k, v = t.split("=") info[k] = v - cj = self.core.requestFactory.getCookieJar(self.__name__, account[0]) + cj = self.core.requestFactory.getCookieJar(self.__name__, user) cj.setCookie("rapidshare.com", "enc", info["cookie"]) |