Skip to main content

Archiving tool for Bilibili based on bilix

Project description

biliarchiver

Archiving tool for Bilibili based on bilix

PyPI version

Install

pip install biliarchiver

Usage

biliarchiver --help

Basic usage

Follow these steps to start archiving:

  1. Initialize a new workspace in current working directory:
biliarchiver init
  1. Provide cookies and tokens following instructions:
biliarchiver auth
  1. Download videos from BiliBili:
biliarchiver down --bvids BVXXXXXXXXX
  • This command also accepts a list of BVIDs or path to a file. Details can be found in biliarchiver down --help.
  1. Upload videos to Internet Archive:
biliarchiver up --bvids BVXXXXXXXXX
  • This command also accepts a list of BVIDs or path to a file. Details can be found in biliarchiver up --help.

Rest API

  1. Start server
biliarchiver api
  1. Add videos
curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:8000/archive/BVXXXXXX

Develop

Install

Please use poetry to install dependencies:

poetry install

Build English locale if necessary. Refer to the last section for details.

Run

poetry run biliarchiver --help

Debug using another workspace:

poetry --directory /path/to/workspace run biliarchiver --help

Lint

poetry run ruff check .

i18n

To generate and build locales, you need a GNU gettext compatible toolchain. You can install mingw and use sh to enter a bash shell on Windows.

Generate or update biliarchiver.pot:

find biliarchiver/ -name '*.py' | xargs xgettext -d base -o biliarchiver/locales/biliarchiver.pot

Add a new language:

msginit -i biliarchiver/locales/biliarchiver.pot -o en.po -l en

Update a language:

msgmerge -U biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po biliarchiver/locales/biliarchiver.pot

(Important) Build a language:

msgfmt biliarchiver/locales/en/LC_MESSAGES/biliarchiver.po -o biliarchiver/locales/en/LC_MESSAGES/biliarchiver.mo

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

biliarchiver-0.1.20.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

biliarchiver-0.1.20-py3-none-any.whl (75.3 kB view details)

Uploaded Python 3

File details

Details for the file biliarchiver-0.1.20.tar.gz.

File metadata

  • Download URL: biliarchiver-0.1.20.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.12.12-amd64

File hashes

Hashes for biliarchiver-0.1.20.tar.gz
Algorithm Hash digest
SHA256 b686be765de5c9575b795c8ad13f6718a967bbc6bcd69525cff1b6d6855b7122
MD5 e60a49d0e93a4f4a3f0e082667a443a0
BLAKE2b-256 d93ff02773fd543ddabbb4b8ac8dfb628e322c8aa4d53718e0844bf41b372d32

See more details on using hashes here.

File details

Details for the file biliarchiver-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: biliarchiver-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 75.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Linux/6.12.12-amd64

File hashes

Hashes for biliarchiver-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 6980ea1dbd8bebd487f73db80eed6847d960834bdc21b72dca3275fc366ef7f0
MD5 e3836e056028352174c0c93ec7c2e9d6
BLAKE2b-256 73f7fbed9f0259eca61680486efd7bc2970f0f13fbe97e664d1f64bfc8fcc9ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page