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.
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!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75f6720d1595466b0b259a0f8f5749ce1a7723d85f79ec832ef85166cf8acb8c
|
|
| MD5 |
bdb88248db19e4ff45171513bc0bdc64
|
|
| BLAKE2b-256 |
065e68bd81426974d0ca12bb37e4e6b433f9c1d73f8ee8882eaec45d526d15e7
|
Provenance
The following attestation bundles were made for androidfilehostscraper-3.0.0.tar.gz:
Publisher:
pypi-publish.yml on codefl0w/AndroidFileHostScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidfilehostscraper-3.0.0.tar.gz -
Subject digest:
75f6720d1595466b0b259a0f8f5749ce1a7723d85f79ec832ef85166cf8acb8c - Sigstore transparency entry: 882677588
- Sigstore integration time:
-
Permalink:
codefl0w/AndroidFileHostScraper@7cc332db634f24e37f2eaf77d468905c9e2982db -
Branch / Tag:
refs/tags/V3.0.0 - Owner: https://github.com/codefl0w
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7cc332db634f24e37f2eaf77d468905c9e2982db -
Trigger Event:
push
-
Statement type:
File details
Details for the file androidfilehostscraper-3.0.0-py3-none-any.whl.
File metadata
- Download URL: androidfilehostscraper-3.0.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e893d14b55b78eb9aa6c2181a1c9f91459ec7c3059fd1f2530b0a28c5774acec
|
|
| MD5 |
f8115f8f990c227953aebfafb1a7b7f3
|
|
| BLAKE2b-256 |
f4938ad51873ac3b93bc92ce00c3d90a7d976792ad31befe5f822992b9e74e3c
|
Provenance
The following attestation bundles were made for androidfilehostscraper-3.0.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on codefl0w/AndroidFileHostScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidfilehostscraper-3.0.0-py3-none-any.whl -
Subject digest:
e893d14b55b78eb9aa6c2181a1c9f91459ec7c3059fd1f2530b0a28c5774acec - Sigstore transparency entry: 882677624
- Sigstore integration time:
-
Permalink:
codefl0w/AndroidFileHostScraper@7cc332db634f24e37f2eaf77d468905c9e2982db -
Branch / Tag:
refs/tags/V3.0.0 - Owner: https://github.com/codefl0w
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7cc332db634f24e37f2eaf77d468905c9e2982db -
Trigger Event:
push
-
Statement type: