webkit2

Getting HTML source using WebKit2

拈花ヽ惹草 提交于 2020-02-24 12:11:02
问题 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

Getting HTML source using WebKit2

∥☆過路亽.° 提交于 2020-02-24 12:10:18
问题 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

Getting HTML source using WebKit2

烈酒焚心 提交于 2020-02-24 12:09:47
问题 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

Getting HTML source using WebKit2

邮差的信 提交于 2020-02-24 12:08:50
问题 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

WebKit2 and DomDocument/JavaScriptCore (Python3)

别等时光非礼了梦想. 提交于 2019-12-24 11:27:59
问题 I am converting a Python3 application to use WebKit2 instead of WebKit (which is no longer available in Debian Buster). In the application the user can (de)select check boxes which I read from the Python3 application. In the original code I could simply get the DomDocument of the Webview and iterate through the child objects to return the value of the object with a given name (sample code below). In WebKit2 the get_dom_document function is no longer available and the WebKit2 documentation is

How to show the inspector within your WKWebView based desktop app?

荒凉一梦 提交于 2019-11-30 04:38:26
I'm looking for a way to show the inspector for a WKWebView inside my Mac app. With WebKit1 and WebView it was easy to show the inspector inside your Mac app, by just setting WebKitDeveloperExtras to true in your UserDefaults. That would give you an "Inspect Element" menu in every web view. But in WebKit2 with WKWebView this is not working anymore. In the WWDC14 inspector session they explain that you have to add an entitlement and can then show the inspector from the Safari developer menu. This only works if you are the developer. I looked through the private headers and found

How to show the inspector within your WKWebView based desktop app?

喜夏-厌秋 提交于 2019-11-29 01:53:30
问题 I'm looking for a way to show the inspector for a WKWebView inside my Mac app. With WebKit1 and WebView it was easy to show the inspector inside your Mac app, by just setting WebKitDeveloperExtras to true in your UserDefaults. That would give you an "Inspect Element" menu in every web view. But in WebKit2 with WKWebView this is not working anymore. In the WWDC14 inspector session they explain that you have to add an entitlement and can then show the inspector from the Safari developer menu.