T
T
Tyscode2021-11-11 14:41:41
Python
Tyscode, 2021-11-11 14:41:41

Why is it giving a 406 error?

import requests
import random, string
import subprocess
import time, os

email = ('[email protected]')
jop = ('dghwgliwehfo')

value = True
while value:
    pass1 = (jop)
    r = requests.post("https://vto.pe/webapi/new/register", data={'email': email, 'password': pass1})
    time.sleep(1)
    if r.status_code == 400:
        print('Ошибка')
        print(r)
    elif r.status_code == 200:
        print('Аккаунт успешно создан')
        print('почта: ', email, 'pass: ', pass1)
    else:
        print(r)





input()


this script should register an account on vtope, but when it is activated, response 406 pops up in the console,
how to fix it? can add streams?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-11
@Tyscode

1. content-type: application/json;so

r = requests.post("https://vto.pe/webapi/new/register", json={'email': email, 'password': pass1})

2. Not the entire request body was passed, there are more parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question