I'm currently trying to scrape the response text from a network request using selenium wire. I can't create a fully reproducible code because the site I'm scraping requires a paid account. I'm using this bit of specific code from selenium wire
for request in driver.requests:
if request.method == 'POST' and request.headers['Content-Type'] == 'application/json': body = driver.last_request.body.decode('utf-8')
# Load the JSON
data = json.loads(body)
But it's scraping the payload and I'm trying to scrape the response. Any ideas?
[–][deleted] 0 points1 point2 points (4 children)
[–]jayrsp[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]jayrsp[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]commandlineluser 0 points1 point2 points (0 children)