@@ -53,7 +53,8 @@ protected function getApplicationPage($packageName, $lang='en_US', $loc='US') {
5353 * Success is signaled by success=1, and details are given via the keys
5454 * packageName, name, developer, category, type (game, app, family), description,
5555 * icon, images (array of screenshot URLs), updated, version, require (min Android version),
56- * install (number of installs), age, rating (float), votes, price, size
56+ * install (number of installs), age, rating (float), votes, price, size,
57+ * ads (has ads: 0|1), iap (in-app-payment used: 0|1)
5758 * if not explicitly specified otherwise, values are strings
5859 */
5960 public function parseApplication ($ packageName , $ lang ='en_US ' , $ loc ='US ' ) {
@@ -119,6 +120,10 @@ public function parseApplication($packageName, $lang='en_US', $loc='US') {
119120 $ values ["rating " ] = $ this ->getRegVal ('/<div class="BHMmbe"[^>]*>(?<content>[^<]+)<\/div>/i ' );
120121 $ values ["votes " ] = $ this ->getRegVal ('/<span class="AYi5wd TBRnV"><span[^>]*>(?<content>[^>]+)<\/span>/i ' );
121122 $ values ["price " ] = $ this ->getRegVal ('/<meta itemprop="price" content="(?<content>[^"]+)">/i ' );
123+ $ test = $ this ->getRegVal ('/<div class="bSIuKf">(?<content>[^<]+)<div/i ' ); // <div class="bSIuKf">Contains Ads<div
124+ (empty ($ test )) ? $ values ["ads " ] = 0 : $ values ["ads " ] = 1 ;
125+ $ test = $ this ->getRegVal ('/<div class="aEKMHc">·<\/div>(?<content>[^<]+)</i ' ); // <div class="aEKMHc">·</div>Offers in-app purchases</div>
126+ (empty ($ test )) ? $ values ["iap " ] = 0 : $ values ["iap " ] = 1 ;
122127
123128 $ limit = 3 ;
124129 while ( empty ($ values ["summary " ]) && $ limit > 0 ) { // sometimes protobuf is missing, but present again on subsequent call
0 commit comments