Getting HTML source using WebKit2
问题 I use a little Python3 program, which I would like to switch from Webkit to WebKit2. In short, I open a Website in a Gtk-Window and would like to store the html code in a variable. For WebKit its easy: import sys import gi gi.require_version('WebKit', '3.0') from gi.repository import WebKit from gi.repository import Gtk, Gdk starturl = 'https://www.google.de' def printHTML(webview, frame): html = frame.get_data_source().get_data().str print(html) webview = WebKit.WebView() webview.open