summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kmarty <gkmarty@gmail.com> 2013-02-26 18:36:37 +0100
committerGravatar kmarty <gkmarty@gmail.com> 2013-02-26 18:36:37 +0100
commit0ab28db74847e9787f56fc7c63f0af2f51aba00f (patch)
treed58518815d54451ccb19fb4a0f339aa8c79a1cb7
parentFixed error getting file size (diff)
downloadpyload-0ab28db74847e9787f56fc7c63f0af2f51aba00f.tar.xz
Fix paid account access (contributed by wendelin)
-rw-r--r--module/plugins/accounts/UlozTo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py
index 0c4ecda6a..232b6b64f 100644
--- a/module/plugins/accounts/UlozTo.py
+++ b/module/plugins/accounts/UlozTo.py
@@ -11,13 +11,13 @@ class UlozTo(Account):
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit/" title="[^"]*?GB = ([0-9.]+) MB">'
+ TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="http://www.ulozto.net/kredit" title="[^"]*?GB = ([0-9.]+) MB"'
def loadAccountInfo(self, user, req):
#this cookie gets lost somehow after each request
- self.phpsessid = req.cj.getCookie("PHPSESSID")
+ self.phpsessid = req.cj.getCookie("ULOSESSID")
html = req.load("http://www.ulozto.net/", decode = True)
- req.cj.setCookie("www.ulozto.net", "PHPSESSID", self.phpsessid)
+ req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid)
found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
trafficleft = int(float(found.group(1).replace(' ','').replace(',','.')) * 1000 / 1.024) if found else 0