【发布时间】:2013-01-02 16:57:25
【问题描述】:
我想写一个bash脚本,可以解析android appstore中应用的版本号。例如这个应用程序,https://play.google.com/store/apps/details?id=com.alphonso.pulse&hl=en
如何从页面右侧的当前版本标题中获取值“3.0.6”?
【问题讨论】:
-
这是
3.0.6的xpath://*[@id="details-tab-1"]/div[1]/dl/dd[3]。您需要找到一种方法来解析网页,并使用 html 解析 regex is not your friend。 -
如果我得到页面怎么办?然后我可以匹配这条线对吗?
Current Version:</dt><dd itemprop="softwareVersion">3.0.6</dd>
标签: regex bash parsing curl sed