从 Android 版 HttpClient 获取 Web 结果

发布于 2024-09-05 22:54:40 字数 686 浏览 1 评论 0 原文

例如:假设我在 沃尔玛主页 上搜索了一些内容。就像 。我如何从列出的第一个产品中检索信息。产品名称、价格、详细信息、评级、型号等信息。我将如何在框中搜索。在我看来,唯一的方法就是替换 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 中调用它。

For example: Say I searched something on the Walmart homepage. Like this. How would I retrieve the information from the first product listed. Information like product name, price, details, rating, model. And how would I search in the box. The only way it seems like to me is to replace http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=someProduct&Find.x=0&Find.y=0&Find=Find. Then replace someProduct with the seach and call it in an HttpClient.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江南烟雨〆相思醉 2024-09-12 22:54:40

它需要一些服务器端任务。当使用您的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文