Skip to main content

A command-line tool to search videos on Bilibili

Project description

Bilibili Search CLI

A command-line tool to search videos on Bilibili and output results in JSON format.

Features

  • Search videos on Bilibili from command line
  • Output results in structured JSON format
  • Customizable number of results
  • Anti-crawler protection built-in

Installation

pip install bilibili-search-cli

Usage

Basic search:

bilibili-search "happy new year"

Limit number of results:

bilibili-search "dance" -n 5

Search with spaces in keyword:

bilibili-search "music video" -n 10

Get help:

bilibili-search --help

Output Format

The tool outputs JSON-formatted data:

{
  "keyword": "happy new year",
  "total_count": 5,
  "videos": [
    {
      "title": "Happy New Year 2025",
      "author": "username",
      "bvid": "BV1X3XbYkEYZ",
      "play_count": 341,
      "duration": "45:22",
      "pubdate": "2025-03-23 11:34:40",
      "url": "https://www.bilibili.com/video/BV1X3XbYkEYZ"
    }
    // ... more videos
  ]
}

Requirements

  • Python 3.6 or higher
  • requests
  • fake-useragent

License

MIT License

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

bilibili_search_cli-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

bilibili_search_cli-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file bilibili_search_cli-1.0.0.tar.gz.

File metadata

  • Download URL: bilibili_search_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for bilibili_search_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b011dc12892d5555985814615a55ca4d6772e30355e1891e29b92627ff78af0
MD5 ef238c099a48c30e5b729c1f906a6a8c
BLAKE2b-256 3bab1d3d26ff93d99ce29d66e9ff5e3e6411ae6d82103aa7cc6daa3ceeead63a

See more details on using hashes here.

File details

Details for the file bilibili_search_cli-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bilibili_search_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18bf21145ba84def25014588325a892b8ffbf83e1437357e0e0a12b8dfa693cc
MD5 f7acb47e030359291d4c535410565ac7
BLAKE2b-256 34d97c7c51d7e81b55c9e7e004b7076f9560bae941b1bff75f6c4bfcec96333a

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