Skip to main content

Simple and powerful Python script to download files from AndroidFileHost by imitating their API calls.

Project description

AndroidFileHost Scraper

Simple and powerful Python script to look for keywords and download files from AndroidFileHost by imitating their API calls. Supports downloading from multiple pages, mirror selection and sorting pages.

GitHub Downloads (all assets, all releases) GitHub Actions Workflow Status

Why?

AFH is slowly dying, which means a lot of ROMs, kernels and whatnot will be forever gone if we don't archive them elsewhere. This script makes everything a lot easier.

Installation

Get the requirements: pip install requests beautifulsoup4

And run the script.

You can also check the releases page to download precompiled executables for your platform if you don't want to install Python. Releases are created automatically using GitHub Actions and mostly untested, so please create an issue if you encounter a problem.

Lastly, you can install the PyPi distribution globally by running pip install AndroidFileHostScraper. You can then call it via either AndroidFileHostScraper or afhscraper in your terminal.

Usage

Interactive mode

Just run the tool, search for keywords, select your preferences and wait. The scraper will automatically go through the files and download them.

Downloads can be found within the root directory of the script.

CLI Mode

AFHScraper V2.0.0 and later can take positional arguements and run like a CLI tool.

options:
  -h, --help            show this help message and exit
  -s, --search SEARCH   Search terms (comma-separated)
  --sort {newest,popular}
                        Sort order (newest or popular)
  -n, --files FILES     Maximum files to download per search term
  -m, --mirror {usa,germany}
                        Preferred mirror location
  -t, --threads THREADS
                        Number of concurrent downloads (default: 1)
  -o, --output OUTPUT   Download directory
  -l, --log-level {DEBUG,INFO,WARNING,ERROR}
                        Logging level (default: INFO)

This can be used to automate downloads. It also lets the user to specify an output directory unlike the interactive mode.

For example, to download the first 20 most popular files each from "twrp" and "lineage" searches with 5 threads from a USA server with DEBUG level outputs:

python AFHscraper.py -s "twrp,lineage" --sort popular -n 20 -t 5 -m usa -l DEBUG

And so on.

Extras

Enjoy my work? Please consider a small donation!

yellow-button

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

androidfilehostscraper-3.0.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

androidfilehostscraper-3.0.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file androidfilehostscraper-3.0.0.tar.gz.

File metadata

  • Download URL: androidfilehostscraper-3.0.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for androidfilehostscraper-3.0.0.tar.gz
Algorithm Hash digest
SHA256 75f6720d1595466b0b259a0f8f5749ce1a7723d85f79ec832ef85166cf8acb8c
MD5 bdb88248db19e4ff45171513bc0bdc64
BLAKE2b-256 065e68bd81426974d0ca12bb37e4e6b433f9c1d73f8ee8882eaec45d526d15e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for androidfilehostscraper-3.0.0.tar.gz:

Publisher: pypi-publish.yml on codefl0w/AndroidFileHostScraper

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

File details

Details for the file androidfilehostscraper-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for androidfilehostscraper-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e893d14b55b78eb9aa6c2181a1c9f91459ec7c3059fd1f2530b0a28c5774acec
MD5 f8115f8f990c227953aebfafb1a7b7f3
BLAKE2b-256 f4938ad51873ac3b93bc92ce00c3d90a7d976792ad31befe5f822992b9e74e3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for androidfilehostscraper-3.0.0-py3-none-any.whl:

Publisher: pypi-publish.yml on codefl0w/AndroidFileHostScraper

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