I want to create a BOT in python to send POST login requests, and then send another request to create a character, but when I run the code it does not create any characters, can anyone help me?
import requests
import random
def gera_char(tamanho):
caracters = 'abcdefghijlmnopqrstuwvxz'
senha = ''
for char in xrange(tamanho):
senha += random.choice(caracters)
return senha
login = raw_input("login: ")
password = raw_input("password: ")
#gerador de nome para o char
charname = gera_char(8)
#urls
url_login = 'http://nto-hard.com/?subtopic=accountmanagement'
url_make = 'http://nto-hard.com/?subtopic=accountmanagement&action=createcharacter'
#dados
dados_make = {
"newcharname": charname,
"newcharsex": "1",
"newcharvocation": "29",
"savecharacter": "1",
"Submit.x": "52",
"Submit.y": "12",
"world": "0"
}
dados_login = {
"account_login": login,
"login.x": "49",
"login.y": "0",
"page": "overview",
"password_login": password
}
requests.post(url_login, data=dados_login)
requests.post(url_make, data=dados_make)