Skip to main content

Bilibili website crawler that can download videos, dm, comments, articles, and more.

Project description

bili-scraper

Bilibili website crawler that can download videos, dm, comments, articles, and more.

This project is for learning purposes only, please don’t use it for commercial purposes.

本项目仅用于学习目的,请勿用于商业用途

License

MIT License

Author

start

You can install it using the pip install bili-scraper command

Demo

from bili_scraper import BiliScraper
import json

if __name__ == '__main__':
    with open("cookie.json", "r", encoding="utf-8") as f:
        cookie = json.load(f)['cookie']

    bilibili = BiliScraper(cookie)

    # Get video
    bilibili.getVideo('BV1Jd1oB3EGD')

    # Get video comments
    comments = bilibili.getVideoComments('BV1Jd1oB3EGD', 'img', 1)
    with open("test.json", "w", encoding="utf-8") as f:
        json.dump(comments, f, ensure_ascii=False)
    
    # Get video Dm
    print(bilibili.getVideoDm("BV1vxPReEERx"))

    # Get Article
    bilibili.getArticle("1102463389176692741", 'doc', 'doc.docx', 'img/test/')

Thanks

This project uses code from:

feedback

If you have any feedback, please contact us:guoziqi329@gmail.com

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

bili_scraper-0.1.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

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

bili_scraper-0.1.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file bili_scraper-0.1.1.tar.gz.

File metadata

  • Download URL: bili_scraper-0.1.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bili_scraper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 602a6734b8c1cf080feb715ba04bde5ce729eb638622ddc8920ac4793eba1354
MD5 1ce0cb7c3ba5aa56ebed9a9b01a4f6e4
BLAKE2b-256 e728a5400d74220beb8851f92b5e7007cf22352a89bfda5d3c749ee9e0e41442

See more details on using hashes here.

Provenance

The following attestation bundles were made for bili_scraper-0.1.1.tar.gz:

Publisher: python-publish.yml on Guoziqi329/bili-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bili_scraper-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bili_scraper-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bili_scraper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22e885c9825900341cbaf8d1d766f09dffd28a69362c9ec44a79bcea50f068fd
MD5 0f8fa3557113b0399f83ea026a95d4c3
BLAKE2b-256 f61b7c94e0d4cd869e236ce258cff675f6ce949364a317ca8653284bcacaf2ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for bili_scraper-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on Guoziqi329/bili-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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