Created
June 18, 2020 22:56
-
-
Save luscas/6b4c9257d92841dbce115ec60bfa924e to your computer and use it in GitHub Desktop.
Disponibilidade de nicks no habbo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from flask import Flask, jsonify, Response | |
import requests | |
app = Flask(__name__) | |
nicks = { | |
'Ganja', | |
'Mandioca', | |
'Tapioca', | |
'Bueno', | |
'Biologa', | |
'Marcelo', | |
'Matheus', | |
'Isa', | |
'Chinelo', | |
'Lizzy', | |
'DJ', | |
'Basuca', | |
'Flash', | |
'Lucas', | |
'Flash', | |
'Puzzle', | |
'girl', | |
'boy', | |
'advogada', | |
'lixo', | |
'feio', | |
'feia', | |
'caixa', | |
'tampa', | |
'acesso', | |
'Energia', | |
'Barra', | |
'Fone', | |
'Mesa', | |
'Pisca', | |
'Foto', | |
'Fita', | |
'Pivete', | |
'Piveta', | |
'Guri', | |
'Guria' | |
} | |
disponiveis = [] | |
indisponiveis = [] | |
for nick in nicks: | |
r = requests.get('https://www.habbo.com.br/api/public/users?name=%s' % nick) | |
data = r.json() | |
isAvailable = data.get('error') | |
if(isAvailable): | |
disponiveis.append(nick) | |
else: | |
indisponiveis.append(nick) | |
@app.route('/') | |
def index(): | |
return Response(json.JSONEncoder().encode({ | |
"disponiveis": disponiveis, | |
"indisponivel": indisponiveis | |
}), mimetype='application/json') | |
@app.route('/user/<username>') | |
def show_user_profile(username): | |
# show the user profile for that user | |
return 'User %s' % username |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
show nick available in 2025