Skip to content

Commit e9b5dd8

Browse files
committed
add parseOthers() to fetch other apps by same developer
1 parent 289220e commit e9b5dd8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Tiny script to crawl information of a specific application in the Google play/st
77
- `parse`: mostly used internally – but can be used to parse any URL or text for valid Play Store app links and return their packageNames
88
- `parseSearch`: search for apps by given terms
99
- `parseSimilar`: search for what Google Play considers apps similar to the one specified
10+
- `parseOthers`: other apps by the same developer
1011
- `parseCategory`: list apps from a specified category
1112
- `parseCategories`: list available categories
1213
- `parseApplication`: get details for a specific app

google-play.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,20 @@ public function parseSimilar($packageName) {
268268
return $this->parse($input, false);
269269
}
270270

271+
/** Obtain list of other apps by same author
272+
* @method parseOthers
273+
* @param string packageName package name of the app to find similars for, e.g. 'com.example.app'
274+
* @return array array of package names
275+
*/
276+
public function parseOthers($packageName) {
277+
if ( ! $this->getApplicationPage($packageName) )
278+
return ['success'=>0,'message'=>$this->lastError];
279+
$input = $this->getRegVal('!<h2 class="sv0AUd bs3Xnd">More by [^<]*</h2></a></div><div class="W9yFB">(?<content>.+?)</c-data></c-wiz></div></div></div><script!ims');
280+
if ( empty($input) )
281+
return ['success'=>0,'message'=>'no data found'];
282+
return $this->parse($input, false);
283+
}
284+
271285
/** Search for apps by a given string
272286
* @method public parseSearch
273287
* @param string query string to search for

0 commit comments

Comments
 (0)