pyqt - Qt WebEngine capture network package -
i porting qt app webkit webengine. in webkit code, use qnetworkaccessmanager capture network packages. in webengine, document say:
qt webengine not interact qnetworkaccessmanager
so can't in webengine code.
this webkit code:
...... reply = qnetworkaccessmanager.createrequest( manager, operation, req, data) def _on_replyfinish(): data = reply.peek(reply.bytesavailable()).data() cookies = manager.cookiejar().mozillacookies() self.resopnsehistroylist.append({ 'reply': reply, 'url': req.url().tostring(), 'host': req.url().host(), 'filename': req.url().filename(), 'body': data, 'code': reply.attribute(qnetworkrequest.httpstatuscodeattribute), 'request_header': get_headers(req), 'cookies': cookies, 'response_header': get_headers(reply), 'time': int(time.time()*1000), }) reply.readyread.connect(_on_replyfinish) ......
i use pyqt5.8 , qt5.8.
i can capture network package using qt webengine developer tools, want in code webkit does.
is there other way apture network packages in webengine in webkit?
Comments
Post a Comment