2013-01-19 45 views

回答

1

你應該使用iTunes中查找API來找回你的JSON格式的結果所需要的信息:
http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

你應該使用憤怒的小鳥里約版看起來像這樣的鏈接:
http://itunes.apple.com/lookup?id=420635506

{ 
    "resultCount":1, 
    "results":[ 
     { 
      "artistId":298910979, 
      "artistName":"Rovio Entertainment Ltd", 
      ... 
      "averageUserRating":4.5, 
      "averageUserRatingForCurrentVersion":4.5, 
      ... 
1

使用http-get你可以看看應用程序的itunes頁面。例如對於憤怒的小鳥里約:https://itunes.apple.com/us/app/angry-birds-rio/id420635506?mt=8&ign-mpt=uo%3D2

然後,如果你想知道總評這裏看看,並嘗試將字符串分割到相關部分:

<div class='extra-list customer-ratings'> 
<h4>Customer Ratings</h4> 
<div>Current Version:</div> 
<div class='rating' role='img' tabindex='-1' aria-label='4 and a half stars, 3113 Ratings'><div><span class="rating-star">&nbsp;</span><span class="rating-star">&nbsp;</span> <span class="rating-star">&nbsp;</span><span class="rating-star">&nbsp;</span><span class="rating-star half">&nbsp;</span></div><span class="rating-count">3113 Ratings</span> 

相關問題