0
class Browser(QWebView):
def __init__(self):
QWebView.__init__(self)
self.loadFinished.connect(self._result_available)
self.loadStarted.connect(self._load_started)
self.page().frameCreated.connect(self.onFrame)
# ...
browser = Browser()
browser.setHtml('<html>...</html>', baseUrl=QUrl('http://www.google.com/'))
在那之後,我需要捕獲由QWebView加載的所有外部資源的內容。我需要獲取所有CSS/Javascript文件的內容。我怎樣才能做到這一點 ?相關問題:question 1,question 2PyQt4的QWebView外部資源內容
我知道我需要以某種方式使用QNetworkAccessManager,但我沒有任何使用示例。