Skip to main content

Search for apks on varius websites

Project description

apksearch

apksearch is a Python library designed to search for APK files on different APK websites, such as APKPure and APKMirror. It allows users to find APKs, check for available versions, and retrieve download links.

The Inspiration: There were countless occasions when I needed a specific APK for a package name, only to find it unavailable on popular platforms. This led to the tedious task of manually visiting multiple websites and searching one by one.

Features

  • Search APKs: The library provides methods to search for APKs using package names.
  • Retrieve APK Versions and Download Links: It can fetch available versions and their download links for a given APK from APKPure and APKMirror.
  • Command-Line Interface: A CLI is available for users to search for APKs directly from the command line.

Installation

To install the apksearch library, use the following command:

pip install git+https://github.com/AbhiTheModder/apksearch.git

OR, through pip:

pip install apksearch

Usage

Command-Line Interface

To use the CLI, run the following command:

apksearch <package_name> [--version <version>]

Example:

apksearch com.roblox.client --version 2.652.765

Library Usage

You can also use the library programmatically in your Python code:

from apksearch import APKPure, APKMirror

# Searching on APKPure
apkpure = APKPure("com.roblox.client")
result = apkpure.search_apk()
if result:
    title, link = result
    print(f"Found on APKPure: {title} - {link}")

# Searching on APKMirror
apkmirror = APKMirror("com.roblox.client")
result = apkmirror.search_apk()
if result:
    title, link = result
    print(f"Found on APKMirror: {title} - {link}")

Classes and Methods

APKPure

  • __init__(self, pkg_name: str): Initializes with the package name.
  • search_apk(self) -> None | tuple[str, str]: Searches for the APK on APKPure and returns the title and link if found.
  • find_versions(self, apk_link: str) -> list[tuple[str, str]]: Finds and returns a list of versions and their download links for the given APK link.

APKMirror

  • __init__(self, pkg_name: str): Initializes with the package name.
  • search_apk(self) -> None | tuple[str, str]: Searches for the APK on APKMirror and returns the title and link if found.
  • find_version(self, apk_link: str, version: str) -> str: Finds and returns the download link for the given APK link and version.

Testing

The project includes tests for the sites classes. To run the tests, use the following command:

pytest

TODO

  • Add more websites to search for APKs.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

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

apksearch-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apksearch-1.0.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file apksearch-1.0.0.tar.gz.

File metadata

  • Download URL: apksearch-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for apksearch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e891780b7e1be14e65f5e025ebed1716f554f4528df3a0b9994bd4770c6c3f8f
MD5 8075fa5c9b64520c85f4b9614560d8e9
BLAKE2b-256 dad89da3f67b6c38aab58ad3ba3219de0a94f043210c443f1fefb98ebc418766

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksearch-1.0.0.tar.gz:

Publisher: python-publish.yml on AbhiTheModder/apksearch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apksearch-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: apksearch-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for apksearch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f4e20b17d1acb698695b6c69c30176b428f1051de36754844c9b47547a9606e
MD5 e8d4c8736d8c9c7ea897d44e8c5c7125
BLAKE2b-256 9762b35f5a3d3a44f4a2f28af2bb2182f1e9a182aea5292fb58b8f42ab622a55

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksearch-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on AbhiTheModder/apksearch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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