We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to retrieve and decode the response body of requests using SeleniumBase. Below is the code I am using:
from seleniumbase import Driver driver = Driver(wire=True) driver.get("https://seleniumbase.io/demo_page") for request in driver.requests: body_bytes = request.response.body str_body = body_bytes.decode("utf-8") print(request.url) print(str_body) driver.quit()
Problem:
Expected Behavior:
How can I properly decode and parse the response body in JSON or as a readable string? Thank you for your support!!
The text was updated successfully, but these errors were encountered:
This is more of a selenium-wire and Python question than a SeleniumBase one.
selenium-wire
Python
The major info about the selenium-wire integration in SeleniumBase can be found here: #2145
Sorry, something went wrong.
For fancier printing, you can also use pprint:
pprint
from rich.pretty import pprint pprint("<h1>hello</h1>")
No branches or pull requests
I am trying to retrieve and decode the response body of requests using SeleniumBase. Below is the code I am using:
Problem:
Expected Behavior:
How can I properly decode and parse the response body in JSON or as a readable string?
Thank you for your support!!
The text was updated successfully, but these errors were encountered: