从 Android 版 HttpClient 获取 Web 结果
例如:假设我在 沃尔玛主页 上搜索了一些内容。就像 此。我如何从列出的第一个产品中检索信息。产品名称、价格、详细信息、评级、型号等信息。我将如何在框中搜索。在我看来,唯一的方法就是替换 http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=someProduct&Find.x =0&Find.y=0&Find=查找。然后将 someProduct 替换为 search 并在 HttpClient 中调用它。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它需要一些服务器端任务。当使用您的 url 搜索时,它应该返回 xml feed,其中包含您需要的字段,如名称、价格等。之后您可以 解析该 xml 并实现您的目标。
但您不可能完成服务器端工作。您可以使用一些html解析器来做到这一点。
Its requires some Server side task. when search the with your url it should return the xml feed which contains what your are needed fields like name, price,etc.After that you can parse that xml and achieve your target.
But its not possible for you to do that serverside work. you can use some html parser to do that.