|
1 | 1 |
|
| 2 | + |
| 3 | + |
2 | 4 | # AndroidFileHost Scraper |
| 5 | + |
3 | 6 | 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. |
4 | 7 |
|
| 8 | + |
| 9 | + |
5 | 10 |   |
6 | 11 |
|
7 | | - |
| 12 | + |
8 | 13 |
|
| 14 | + |
| 15 | + |
9 | 16 |
|
10 | 17 | ## Why? |
11 | 18 |
|
| 19 | + |
| 20 | + |
12 | 21 | 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. |
13 | 22 |
|
| 23 | + |
| 24 | + |
14 | 25 | ## Installation |
15 | | -Get the requirements: `pip install requests beautifulsoup4` |
16 | | -And run the script. |
| 26 | + |
| 27 | +Get the requirements: `pip install requests beautifulsoup4` |
| 28 | + |
| 29 | +And run the script. |
| 30 | + |
| 31 | + |
17 | 32 |
|
18 | 33 | You can also check the [releases](https://github.com/codefl0w/AndroidFileHostScraper/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. |
19 | 34 |
|
| 35 | + |
| 36 | + |
20 | 37 | 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. |
21 | 38 |
|
| 39 | + |
| 40 | + |
22 | 41 | ## Usage |
23 | | -Just run the tool, search for keywords, select how the files should be sorted, choose the amount of files to download, select your primary server and hit enter. The scraper will automatically go through the files and download them. |
| 42 | + |
| 43 | +### Interactive mode |
| 44 | + |
| 45 | +Just run the tool, search for keywords, select your preferences and wait. The scraper will automatically go through the files and download them. |
24 | 46 |
|
25 | 47 | Downloads can be found within the root directory of the script. |
26 | 48 |
|
| 49 | +### CLI Mode |
| 50 | + |
| 51 | +AFHScraper V2.0.0 and later can take positional arguements and run like a CLI tool. |
| 52 | + |
| 53 | + options: |
| 54 | + -h, --help show this help message and exit |
| 55 | + -s, --search SEARCH Search terms (comma-separated) |
| 56 | + --sort {newest,popular} |
| 57 | + Sort order (newest or popular) |
| 58 | + -n, --files FILES Maximum files to download per search term |
| 59 | + -m, --mirror {usa,germany} |
| 60 | + Preferred mirror location |
| 61 | + -t, --threads THREADS |
| 62 | + Number of concurrent downloads (default: 1) |
| 63 | + -o, --output OUTPUT Download directory |
| 64 | + -l, --log-level {DEBUG,INFO,WARNING,ERROR} |
| 65 | + Logging level (default: INFO) |
| 66 | + |
| 67 | + |
| 68 | +This can be used to automate downloads. It also lets the user to specify an output directory unlike the interactive mode. |
| 69 | + |
| 70 | +### Extras |
| 71 | + |
| 72 | +Enjoy my work? Please consider a small donation! |
27 | 73 |
|
| 74 | +<a href="https://buymeacoffee.com/fl0w" target="_blank" rel="noopener noreferrer"> |
| 75 | + <img width="350" alt="yellow-button" src="https://github.com/user-attachments/assets/2e6d44c8-9640-4cb3-bcc8-989595d6b7e9"/> |
| 76 | +</a> |
28 | 77 |
|
0 commit comments