Asynchronous batch directory crawler & downloader
Project description
BatchDownload
异步批量目录爬虫,支持断点续传、深度限制、扩展名过滤等功能。
import asyncio
from batchdownload import BatchDownload
async def main():
crawler = BatchDownload(
url="https://example.com/files",
depth=2,
store_dir="downloads",
ext={".zip", ".pdf"}
)
links = await crawler.fetch()
await crawler.download(max_workers=5)
if __name__ == "__main__":
asyncio.run(main())
首次使用前需安装浏览器依赖:
playwright install chromium
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
batchdownload-0.1.0.tar.gz
(17.2 kB
view details)
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 batchdownload-0.1.0.tar.gz.
File metadata
- Download URL: batchdownload-0.1.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b2abbfb4d7028ef4902db822462532be9937e0f3e1fa499688d569844c3ec58
|
|
| MD5 |
969b50764f9ce7324dd0a52bec2e2094
|
|
| BLAKE2b-256 |
914716f6d0c64b3990cb55419ac76536903e48d477ca28f84d6e74622f108946
|
File details
Details for the file batchdownload-0.1.0-py3-none-any.whl.
File metadata
- Download URL: batchdownload-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85018baa48d9847f76aef8b7fd7a54fc262006bcabac49b274bf665753d645be
|
|
| MD5 |
388145339ca0318c08c1c0703952231e
|
|
| BLAKE2b-256 |
223d9b28a4fd38e0277e8a1dcc4c66a31db9405fad77c86dec7a13c61e065a88
|