Skip to main content

Downloader wrapper

Project description

aio-downloader

PyPI Python License

aio-downloader là thư viện Python để parse URL và tải media trực tiếp từ nhiều nền tảng

Install

pip install aio-downloader
playwright install chromium

CLI

aio-down "URL" -P downloads --all -o "%(title)s_%(idx)s.%(ext)s"

Options (tóm tắt)

  • -P, --paths: thư mục lưu
  • -o, --outtmpl: output template
  • --all: tải tất cả media
  • --headful: mở browser UI
  • --no-unlock: tắt unlock
  • --timeout: timeout giây
  • --write-json: ghi JSON cạnh file
  • --quiet: tắt progress

Library

from aio_downloader import DownloadWorker

w = DownloadWorker(allMedias=True, outtmpl="%(title)s_%(idx)s.%(ext)s")
res = w.DownloadSync("URL", "downloads")
print(res.paths)

Progress Hooks

Hook nhận dict trạng thái.

from aio_downloader import DownloadWorker

def Hook(d):
    if d["status"] == "downloading":
        print(d["filename"], d.get("downloaded_bytes"), d.get("total_bytes"))
    elif d["status"] == "finished":
        print("done", d["filename"])

w = DownloadWorker(progressHooks=[Hook])
w.DownloadSync("URL", "downloads")

Docs

License

MIT

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

aio_downloader_cli-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

aio_downloader_cli-0.1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file aio_downloader_cli-0.1.0.tar.gz.

File metadata

  • Download URL: aio_downloader_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for aio_downloader_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cbb0246a9066cd964a08bf846f069135dbeb58a1673e0d33ecb9d27c7772d476
MD5 1f95fb433028bf2a8cfdcc696f1b6198
BLAKE2b-256 1c1ff549254c5f20a741966ada682f66a5d0b1006dce6942370d285a563f75ab

See more details on using hashes here.

File details

Details for the file aio_downloader_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aio_downloader_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd4db559de713388a939c89c59bc157bbdf8591e15879b4876b755739d29b697
MD5 086d60bfc729337cccaea2d73dc12a15
BLAKE2b-256 26afdfb347e3b2058390c2ad937b938e4c5adf3ccf19bbb9f0e2d9211a117a49

See more details on using hashes here.

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