diff options
| author | 2011-11-22 00:26:08 +0100 | |
|---|---|---|
| committer | 2011-11-22 00:26:08 +0100 | |
| commit | 9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d (patch) | |
| tree | 325aba4194c29ee7869f662e1b8f8b5015afd283 /module/plugins/accounts | |
| parent | SimpleHoster fix (diff) | |
| download | pyload-9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d.tar.xz | |
fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns
Diffstat (limited to 'module/plugins/accounts')
| -rw-r--r-- | module/plugins/accounts/HellspyCz.py | 19 | 
1 files changed, 5 insertions, 14 deletions
| diff --git a/module/plugins/accounts/HellspyCz.py b/module/plugins/accounts/HellspyCz.py index c07fd748a..5f14a093e 100644 --- a/module/plugins/accounts/HellspyCz.py +++ b/module/plugins/accounts/HellspyCz.py @@ -29,8 +29,7 @@ class HellspyCz(Account):      __author_name__ = ("zoidberg")      __author_mail__ = ("zoidberg@mujmail.cz") -    ACTION_PATTERN = r'<div id="snippet--loginBoxSn"><form[^>]*action="([^"]+user_hash=([^"]+))">' -    CREDIT_LEFT_PATTERN = r'<strong class="text-credits">(\d+)</strong>' +    CREDIT_LEFT_PATTERN = r'<strong>Credits: </strong>\s*(\d+)'      WRONG_PASSWORD_PATTERN = r'<p class="block-error-3 marg-tb-050">\s*Wrong user or password was entered<br />'      phpsessid = '' @@ -50,16 +49,13 @@ class HellspyCz(Account):          return {"validuntil": -1, "trafficleft": credits}      def login(self, user, data,req): -        html = req.load('http://www.hellspy.com/') -        found = re.search(self.ACTION_PATTERN, html) -        if found is None: -           self.logError('Parse error (FORM)') -        action, self.phpsessid = found.group(1).replace('&','&'), found.group(2) - +        header = req.load('http://www.hellspy.com/', just_header = True) +        self.phpsessid = re.search(r'PHPSESSID=(\w+)', header).group(1)                 self.logDebug("PHPSESSID:" + self.phpsessid) +                  html = req.load("http://www.hellspy.com/--%s-" % self.phpsessid) -        html = req.load(action, post={ +        html = req.load("http://www.hell-share.com/user/login/?do=apiLoginForm-submit&api_hash=hellspy_iq&user_hash=%s" % self.phpsessid, post={                  "login": "1",                  "password": data["password"],                  "username": user, @@ -70,10 +66,5 @@ class HellspyCz(Account):          cj = self.getAccountCookies(user)          cj.setCookie(".hellspy.com", "PHPSESSID", self.phpsessid) -        self.logDebug(req.lastURL) -        self.logDebug(req.lastEffectiveURL) - -        html = req.load("http://www.hellspy.com/", get = {"do":"loginBox-login"}) -          if not re.search(self.CREDIT_LEFT_PATTERN, html):              self.wrongPassword()
\ No newline at end of file | 
