Results 1 to 5 of 5
  1. #1

    Default [Python] Habbo.com/me LogIn Error

    I'm trying to login on Habbo.com/me via Python... this worked fine untill a few weeks ago. Does anyone know how to fix this? I really need it to work. It now gives me a HTTPError: HTTP Error 405: Not Allowed

    Code:
    import urllib, urllib2
    import cookielib
    import sys
    
    class WebLogin(object):
    
        def __init__(self):
            self.base_url = 'http://www.habbo.com/account/submit'
            self.cookies  = 'login.cookies'
            self.username = '[USERNAME]'
            self.password = '[PASSW]'
            self.cj       = cookielib.MozillaCookieJar(self.cookies)  
            self.opener   = urllib2.build_opener(urllib2.HTTPRedirectHandler(),urllib2.HTTPHandler(debuglevel=0),urllib2.HTTPSHandler(debuglevel=0),urllib2.HTTPCookieProcessor(self.cj))
            self.opener.addheaders = [('User-agent', ('Mozilla/4.0 (compatible; MSIE 6.0; ''Windows NT 5.2; .NET CLR 1.1.4322)'))]
            response      = self.opener.open(self.base_url)
            self.cj.save()
            login_data = urllib.urlencode({'credentials.username' : self.username, 'credentials.password' : self.password, 'remember_me' : True})
            response = self.opener.open(self.base_url, login_data)
            self.cj.save()
    
    if __name__ == "__main__":
        WebLogin()
    - Puhekupla

  2. #2
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:

    Default

    Python isn't really my thing, but I found someone with a similar problem who solved it, check it out and see if their solution works for you: http://stackoverflow.com/questions/1...05-not-allowed

  3. #3

    Default

    Quote Originally Posted by Trinity View Post
    Python isn't really my thing, but I found someone with a similar problem who solved it, check it out and see if their solution works for you: http://stackoverflow.com/questions/1...05-not-allowed
    omg... that fixed it How can I ever thank you?! It was just 1 simple line of code.. you're amazing
    Code:
    opener.addheaders = [('Cookie', ('Cookie=__utma=153703329.933658361.1381006081.1383736602.1383907431.5; __utmz=153703329.1383907431.5.2.utmcsr=habbo.es|utmccn=(referral)|utmcmd=referral|utmcct=/; optimizelySegments=%7B%22194789649%22%3A%22ff%22%2C%22194785620%22%3A%22false%22%2C%22194892383%22%3A%22direct%22%7D; optimizelyEndUserId=oeu1381006116417r0.36263510399804744; optimizelyBuckets=%7B%7D; __qca=P0-779179403-1381006121137; YPF8827340282Jdskjhfiw_928937459182JAX666=86.85.232.212; DOAReferrer=; SLID=138390742353417208.0; lec="HABBO,138390742353417208,https://www.habbo.es/"; __utmb=153703329.1.10.1383907431; __utmc=153703329'))]

  4. #4

    Default

    Ah well.. 1 step further

    'Missing cookie support
    Cookies are disabled on your browser. Please enable cookies to use Habbo.'
    Last edited by Puhekupla; 08-11-2013 at 11:24 AM.

  5. #5
    Join Date
    Oct 2006
    Posts
    9,905
    Tokens
    26,858
    Habbo
    Zak

    Latest Awards:

    Default

    Just enable cookies in your browser?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •