安卓:填写表单数据和提取HTML [英] Android: Fill Form Data and Extract HTML

查看:204
本文介绍了安卓:填写表单数据和提取HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很简单的问题:

I have a very simple problem:

用java(和Android),我试图去某个网站(给定的URL),填写表单域,登录(即点击一个按钮),然后提取结果页面的HTML源代码。

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.

我曾尝试已经使用无头浏览器和htmlparsers像HTML股和硒,但罐子总是冲突,他们似乎并没有与Android合作。

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.

我会去要不然怎么这样做呢? (另外,我需要这无需用户看到的WebView或页面,因此在后台发生)。

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).

推荐答案

做检查 HTML

Html.fromHtml("<a href=http://saurabh-nigam.blogspot.com/>myblogt</a>")

和也是这个帖子的链接'为Android HTML解析器有些解析器

And also this post 'html parsers for android' links some parsers

这篇关于安卓:填写表单数据和提取HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆