Android Question Accessing Chrome engine without using a WebView?

Alessandro71

Well-Known Member
Licensed User
Longtime User
In my project, I need to perform some screen scraping on a dynamic web page that is built on the browser.
Actually I'm using an invisible WebView, were I load the target url and get back the resulting HTML.
This trick can't be used in a service or receiver, because there is no Activity with a WebView active.
Is there any way to load a web page outside a WebView.
A simple http download job won't do the trick, since it will download only the root html and not the whole resulting page.
 

jofi

New Member
Yes, there are ways to perform screen scraping on a dynamic web page outside of a WebView. One approach is to use a headless browser like Puppeteer or PhantomJS. These tools allow you to run a browser instance in the background, without the need for a visible window or user interaction. You can use the headless browser to navigate to the target web page, wait for it to fully load, and then extract the resulting HTML using JavaScript. Another approach is to use a tool like Selenium WebDriver, which allows you to automate interactions with a web page using various programming languages. With Selenium, you can programmatically interact with the web page, wait for dynamic content to load, and then extract the resulting HTML. These approaches may require some setup and configuration, but they offer more flexibility than using a WebView, especially if you need to perform screen scraping in a service or receiver.
 
Upvote 0
Top