Skip to main content

Google Play Store async application scraper

Project description


Asynchronously scrapes and parses application data from the Google Play Store.
(Fork of play-scraper, a synchronous Google Play Store scraper, https://github.com/danieliu/play-scraper)

### Installation

Install with pip.

```
pip install playmate
```

#### details

Fetch an application's details.

```python
async with PlayMate() as mate:
app_info = await mate.get_app_details(app_id)
```
* `app_id` the app id to get, e.g. `com.android.chrome` for Google Chrome.


#### collection

Fetch a list of applications from a collection, optionally filtered by category.

```python
async with PlayMate() as mate:
collection = await mate.get_apps(
coln_id, catg_id, max_page=max_page
)
```
* `coln_id` a [collection](https://github.com/Gulats/playmate/blob/master/playmate/lists.py#L3) to fetch.
* `catg_id` a [category](https://github.com/Gulats/playmate/blob/master/playmate/lists.py#L12) to filter by.
* `max_page` (default 1, max 5) the number of pages to fetch with each page containing 120 records.


#### search

Fetch a list of applications matching a search query. Retrieves `20` apps at a time.

```python
async with PlayMate() as mate:
search_results = await mate.search_apps(
term, max_page=max_page
)
```
* `term` query term(s) to search for.
* `max_page` (default 1, max 5) the number of pages to fetch with each page containing 48 records.


#### similar

Fetch a list of similar applications.

```python
async with PlayMate() as mate:
similar_apps = await mate.get_similar_apps(app_id)
```
* `app_id` the app id to get, e.g. `com.supercell.clashofclans` for Clash of Clans.


#### custom settings

Add customisation to the request

```python
async with PlayMate(
headers=dict(Origin='https://play.google.com'),
timeout=180,
hl='en', gl='us') as mate:
app_info = await mate.get_app_details(app_id)
```
* `headers` the headers to be sent for each request
* `timeout` the total timeout for each request in seconds
* `hl` (default `en` for English) the language code to receive results in a specific language
* `gl` (default `us` for United States) the country code to receive results based from a specific country


#### manually close session

Manually close a persisted session

```python
mate = PlayMate()
app_info = await mate.get_app_details(app_id)
await mate.close()
```


### Tests

Run test:
```
make test
```
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playmate-0.5.6.tar.gz (16.4 kB view details)

Uploaded Source

File details

Details for the file playmate-0.5.6.tar.gz.

File metadata

  • Download URL: playmate-0.5.6.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for playmate-0.5.6.tar.gz
Algorithm Hash digest
SHA256 637131280a69dc43aa3ffb08028e306b0c018d943d785e5ac5ae08c037a0e36d
MD5 25928cc351135d86072ca471ddd541f8
BLAKE2b-256 0842b5e8dfca17ad7d02beec0b1fc1fa27568bef41e328dfdeee7c9444e6a5e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page