Nov-06-2021, 04:51 PM
(This post was last modified: Nov-06-2021, 04:51 PM by Yoriz.
Edit Reason: Added code tags
)
Hello, I would like to go to page https://losoviny.iamroot.eu/part_one and write json text from there.
End at first I must login in https://losoviny.iamroot.eu/part_one_login and use
details in header.
But if If I run code I see:
(Header data are correct)
Thank you
There is my code:
End at first I must login in https://losoviny.iamroot.eu/part_one_login and use
details in header.
But if If I run code I see:
Error:raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Do you know how to rewrite it?(Header data are correct)
Thank you
There is my code:
import json import requests headers = { 'username': 'Loskarlos', 'password': 'JednohoDneOvladnuKSI' } response = requests.post('https://losoviny.iamroot.eu/part_one_login', headers=headers) response_get = requests.get('https://losoviny.iamroot.eu/part_one ') response_get = json.loads(response_get.json()) print(response_get)