I`m trying to get access to an area with a Network response
I`m using the following code, but it does not work.
import websocket
import json
from pprint import pprint
ws = websocket.WebSocket()
ws.connect("ws://localhost:9222/devtools/page/5EC90A588BEC2DA0229988D28BA67495")
ws.send(json.dumps({"method": "Network.getResponseBody", "id": })) # don`t know where i can find it
response = ws.recv()
pprint(response)
And I`m not sure if I do the right things. So, does anybody know how to do this?
PS I know, I can make a direct request to API web-source and get JSON Object, but I need to make it with Chrome DevTools Protocol
Ok, I finally found it! U just need to use the following method: "Network.getResponseBody"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.