问题
I have a very simple problem:
Using java (and android) I am trying to go to a certain website (URL given), fill in form fields, login (i.e. clicking a button) and then extract the HTML source of the resulting page.
I have tried already to use headless browsers and htmlparsers like HTML Unit and Selenium, but the jars always conflict and they don't seem to work with Android.
How else would I go about doing this? (Also, I need this to happen without the user needing to see a WebView or page, so in the background).
回答1:
do check HTML class
Html.fromHtml("<a href=http://saurabh-nigam.blogspot.com/>myblogt</a>")
And also this post 'html parsers for android' links some parsers
来源:https://stackoverflow.com/questions/8997546/android-fill-form-data-and-extract-html