Webview - read or download source to device?

Hi,

Wondering if Corona (lua script) can read what’s in webview. Perhaps save source of the page?

Then I could use what’s on the page within my app. The page I want to use is not under my control.

A form of web scraping I suppose.

Also, what happens cookies set by the web page? Are they retained the next time the webpage is launched in webview?

You would use network.request() or network.download() to get the HTML source of the page. In the case of network.request() it will come in as a big string into your Lua app, if you do network.download() you will end up with an HTML file wherever you told it to download it to. You would have to parse the file looking for what you want. But you would have to do that regardless.

Rob

You would use network.request() or network.download() to get the HTML source of the page. In the case of network.request() it will come in as a big string into your Lua app, if you do network.download() you will end up with an HTML file wherever you told it to download it to. You would have to parse the file looking for what you want. But you would have to do that regardless.

Rob