From: Albretch M. <lb...@gm...> - 2022-05-25 06:22:06
|
Say, as part of a JFX Browser kind of application you use the Wekit's WebView which internally uses its own javascript engine. Is there a way to avail yourself of WebView's: https://webkit.org/blog/27/javascript-and-dom-compatibility/ instead of htmlunit's Rhino-based javascript engine? Basically, if a page is fully or partially javascript generated (most if not all pages nowadays) you would get its full html stream, tidy it and tinker with it before it is handled by the browser's rendering engine. This is how it would go: 1) page request 2) WebView component fields it, deals with cookies, https connections, login credentials and such things 3) fully parses its text stream and before it starts downloading pictures, videos, ... 4) *** here comes the code I have in mind to parse and scrape the complete text stream of the html page request *** 5) then, as determined by the user, the "sanitized" output of (4) will be passed onto the browser I am thinking of using htmlunit for (4) How could you do that? Any code examples? Thank you, lbrtchx |