How can i do with webView:
1- take download Requests from webView and download it in custom folder.
2- Know what the Current web site is running now in the webView.
And is there a way to get an javascript message from webView ?
How can i do with webView:
1- take download Requests from webView and download it in custom folder.
2- Know what the Current web site is running now in the webView.
And is there a way to get an javascript message from webView ?
You should checkout @mikael's wkwebview which makes two way interactions in JavaScript easier(e.g., JavaScript can access python variables, etc. )
You can use load_html instead load_url on the regular WebView to browse a requests response, if you originally made the get using requests.
To get current url from a regular WebView, usually this works
w.eval_js('window.location')
Also, another way to get page source would be
w.eval_js('document.documentElement.outerHTML')
@JonB said:
To get current url from a regular WebView, usually this works
w.eval_js('window.location')Also, another way to get page source would be
w.eval_js('document.documentElement.outerHTML')
Si funciona