You can try to do this through evaluating custom JavaScript in the context of the web page.
import QtWebKit 3.0
import QtWebKit.experimental 1.0
WebView {
id: webView
anchors.fill: parent
anchors.margins: 5
onLoadingChanged: {
// if loading succeeded, evaluate the script and display its result
if (!loading && loadRequest.status === WebView.LoadSucceededStatus) {
var script = "(function() { return document.getElementById('text').innerHTML })()"
experimental.evaluateJavaScript( input.script, function(result) {
console.log( "result=" + result );
} );
}
import QtWebKit 3.0
import QtWebKit.experimental 1.0
WebView {
id: webView
anchors.fill: parent
anchors.margins: 5
onLoadingChanged: {
// if loading succeeded, evaluate the script and display its result
if (!loading && loadRequest.status === WebView.LoadSucceededStatus) {
var script = "(function() { return document.getElementById('text').innerHTML })()"
experimental.evaluateJavaScript( input.script, function(result) {
console.log( "result=" + result );
} );
}
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks