Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
An unofficial Python API that let you search, browse and download Android apps from Google Play Store
An unofficial Python API that let you search, browse and download Android apps from Google Play Store.
pip install python-gpapi2
[!IMPORTANT] Currently, this API is still in development. The API may change in the future.
Many features are not yet implemented at this time, I will continue to work on it.
from gpapi2 import GooglePlayAPI
gpapi = GooglePlayAPI(email="example@gmail.com")
# See README.md section "Obtaining the Google Play Store token" for more information
gpapi.login(aas_token="aas_et/AKpp...")
# Get the details of an app
# NOTE: The method currently returns a JSON string, you can use the
# `json.loads` to convert it to a Python dictionary. I will change it
# to return a user-friendly object in the future.
details = gpapi.details("com.whatsapp")
# Get the version of an app
version, version_code = gpapi.latest_version("com.whatsapp")
# Get the download link of an app
download_link = gpapi.download_url("com.whatsapp", version_code)
[!IMPORTANT] Please ensure to protect the OAuth Token or AAS Token obtained below and do not disclose it to anyone, as this could put your Google account at risk.
To use this API, you need to obtain a Google Play Store token. You can do this by following these steps:
First, you need to obtain an OAuth token. You can do this by opening the following URL in your browser:
https://accounts.google.com/embedded/setup/v2/android
And then:
Open the developer console in your browser (F12)
Log in with your Google account on the page that appears.
If the Google Terms of Services page appears, accept it. (It can hang up but it's normal)
Go to the Application
tab of the developer console.
Expand the Cookies
section and select the https://accounts.google.com
entry.
There should be a cookie named oauth_token
. Copy its value. This is your
OAuth token. (It should look like oauth2_4/0AdL...
)
This token can be used only once.
Then, you need to obtain an AAS token. Run the following code:
from gpapi2 import GooglePlayAPI
email = "example@gmail.com"
oauth_token = "oauth2_4/0AdL..."
aas_token = GooglePlayAPI.request_aas_token(email, oauth_token)
print(aas_token)
You should see a long string of characters. This is your AAS token.
It should looks like this: aas_et/AKpp...j25Q
This project is licensed under the MIT License or the Apache License 2.0, at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
An unofficial Python API that let you search, browse and download Android apps from Google Play Store
We found that python-gpapi2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.