获取信息关于在谷歌Play应用 [英] Getting info about apps on Google Play
问题描述
什么是获得在谷歌播放应用程序的应用程序评级和用户评论的方式,如果我有编号汇入作业?
what is the way to get app rating and user reviews of an app on Google Play, if I have it´s Id?
推荐答案
由于没有官方的API,这里是快速和肮脏的方式:
Since there is no official API, here is the quick and dirty way:
使用HttpClient的获得请求的页面,即的https: //play.google.com/store/apps/details?id=com.poncho.yapm 。
Use HttpClient to get the requested page, i.e. "https://play.google.com/store/apps/details?id=com.poncho.yapm".
查看网页源代码,并学习如何解析的页面,让你从响应想要的东西。
例如,对于评价:
View the page source and learn how to parse the page and get what you want from the response. For example, for rating:
- 搜索第一个关于此应用。
- 从previous结果开始,搜索为先'ratingValue
- 从previous结果开始,搜索第一个内容=
- 从previous结果开始,搜索'。
- 该评级位于最后两个位置之间。
主要的缺点:如果谷歌改变页面布局,您将需要更改您的实现。
但是,当您使用正式API这往往也发生了。
The major drawback: if Google change the page layout you will need to change your implementation. However, this often happen also when you use formal API.
如果这是一个真正的应用程序,运行日常的测试,验证您的code将节省您的时间和客户。
If this is a real application, running a daily test that verifies your code would save you time and customers.
希望这有助于亚龙
这篇关于获取信息关于在谷歌Play应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!