PDA

View Full Version : [Python] Habbo.com/me LogIn Error



Puhekupla
05-11-2013, 08:44 PM
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


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.HTTPSHa ndler(debuglevel=0),urllib2.HTTPCookieProcessor(se lf.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

Trinity
07-11-2013, 04:54 PM
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/18342506/urllib-error-httperror-http-error-405-not-allowed

Puhekupla
08-11-2013, 10:52 AM
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/18342506/urllib-error-httperror-http-error-405-not-allowed

omg... that fixed it :O:O:O:O:O:O:O How can I ever thank you?! It was just 1 simple line of code.. you're amazing :D

opener.addheaders = [('Cookie', ('Cookie=__utma=153703329.933658361.1381006081.138 3736602.1383907431.5; __utmz=153703329.1383907431.5.2.utmcsr=habbo.es|ut mccn=(referral)|utmcmd=referral|utmcct=/; optimizelySegments=%7B%22194789649%22%3A%22ff%22%2 C%22194785620%22%3A%22false%22%2C%22194892383%22%3 A%22direct%22%7D; optimizelyEndUserId=oeu1381006116417r0.36263510399 804744; optimizelyBuckets=%7B%7D; __qca=P0-779179403-1381006121137; YPF8827340282Jdskjhfiw_928937459182JAX666=86.85.23 2.212; DOAReferrer=; SLID=138390742353417208.0; lec="HABBO,138390742353417208,https://www.habbo.es/"; __utmb=153703329.1.10.1383907431; __utmc=153703329'))]

Puhekupla
08-11-2013, 11:09 AM
Ah well.. 1 step further :P

'Missing cookie support
Cookies are disabled on your browser. Please enable cookies to use Habbo.'

Zak
08-11-2013, 12:55 PM
Just enable cookies in your browser?

Want to hide these adverts? Register an account for free!