FetchAnything
A command-line tool to fetch files from websites recursively.
Installation
You can install FetchAnything using pip:
pip install fetchanything
Or from source:
git clone https://github.com/yourusername/fetchanything.git
cd fetchanything
pip install -e .
Usage
Basic usage:
fetchanything <URL> [options]
Options
-l, --level LEVEL: Maximum crawl depth (default: 2)-f, --filter PATTERN: File pattern to match (e.g., ".pdf", ".jpg")-u, --url-pattern PATTERN: Regex pattern to match URLs for crawling (e.g., "./blog/.")-o, --out DIRECTORY: Output directory (default: downloads)-v, --verbose: Enable verbose output
Examples
- Download all PDF files from a website up to depth 2:
fetchanything https://example.com --level 2 --filter "*.pdf" --out download_pdf
- Download all files from a website up to depth 1:
fetchanything https://example.com --level 1 --out downloads
- Download all images with verbose output:
fetchanything https://example.com --filter "*.jpg" -v
- Download PDFs only from blog pages:
fetchanything https://example.com --filter "*.pdf" --url-pattern ".*/blog/.*"
- Download files only from specific subdomain:
fetchanything https://example.com --url-pattern "https://docs\\.example\\.com/.*"
Features
- Recursive website crawling with depth control
- File pattern matching
- URL pattern filtering
- Progress tracking with tqdm
- Verbose logging option
- Persistent HTTP sessions
- Error handling and graceful interruption
Requirements
- Python 3.7 or higher
- requests
- beautifulsoup4
- tqdm
- urllib3
License
MIT License
Metadata
Release files for fetchanything 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fetchanything-0.2.0.tar.gz | 17.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fetchanything-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.5 kB
Release files / fetchanything-0.2.0.tar.gz
| Download URL | fetchanything-0.2.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be0cf4c8fb003c36ea4a4250c019d8be8d294f3c2f82cbbba4b7cd8828ddf1fd
|
|
BLAKE2b-256 checksum How to use checksums |
2ecaf18cb91d0b3af40ccc5209cf4927032917d306b9336bce124403f4585a39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2025.
Transparency logRelease files / fetchanything-0.2.0-py3-none-any.whl
| Download URL | fetchanything-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4f8d913125e09463b452ef58576dd8a6ee6d0deb47b7f73793c20f8fbac8e1e
|
|
BLAKE2b-256 checksum How to use checksums |
eea2a0d4d28066586d7a38dd3bfe2570c6f6815f8c2815e7800a1597f4a5863f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2025.
Transparency log