How do I receive a response from the browser after sending a request from the code?

Asked 2 years ago, Updated 2 years ago, 133 views

The response that comes back after making a request using requests.post with Python is HTML including JavaScript, so in this case, which library should I use to receive a response from the browser? Selenium is a web browser -> Python code for parsing, so I don't think it's... I'm going to go from Python code to the web browser.

import requests

response = requests.post(URL, data=my_data)
# # print(response.text)
# # <!DOCTYPE HTML>....
# I want to see your response in my browser

To be exact, I'm programming the GUI, so when I press the button, I'm trying to send a post request and show the result of returning it by displaying a browser, but I don't know how.

python browser requests

2022-09-22 11:59

1 Answers

The link below will help you.

https://docs.python.org/3.7/library/webbrowser.html


2022-09-22 11:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.