Android: Fill Form Data and Extract HTML

五迷三道 提交于 2019-12-11 14:44:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!