Forum Archive

How to do with webView..

Raymond

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 ?

JonB

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.

JonB

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')
COMPRARJAMONES

@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