0

The problem is that server status to my request answer 200 and its good, it means i have connection, but 'Content-Type': 'text/html' server:'nginx', how i can get information from this server ?

Thanks in advance.

3
  • I would recommend using bs4(beautiful soup) Commented Jul 27, 2022 at 5:17
  • Did you search in the doc? requests.readthedocs.io/en/latest/user/quickstart/… Commented Jul 27, 2022 at 5:31
  • Hello @AT, and welcome to StackOverflow! Can you post the link to the API you are using, and/or the returned content of the API (or an excerpt of it)? Please also post the code you currently have. Commented Jul 31, 2022 at 10:15

1 Answer 1

1

Those fields are available in the header.

r.headers['Content-Type']
r.headers['server']
Sign up to request clarification or add additional context in comments.

2 Comments

yes, all information i have, my problem is to get information from this server, i mean all data, company provided identify names of data, but i see that this is not JSON, it's Javascript page with no any information.
That could be because the api isn't returning any json payload, otherwise you would get them in r.json()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.