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.2.tar.gz (19.6 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.2-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bili_scraper-0.1.2.tar.gz
  • Upload date:
  • Size: 19.6 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.2.tar.gz
Algorithm Hash digest
SHA256 da71b046a8e231503e76053aef36db0fbe83c12f9488bb4c55e89b7dae77058d
MD5 dbd7fb96342e2c6c09968ca9c2424262
BLAKE2b-256 6ef18476bfba37a42c39aced48c9d6b481a8006ae830a315caa062fa79963482

See more details on using hashes here.

Provenance

The following attestation bundles were made for bili_scraper-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: bili_scraper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66c7c86488a30ef39f773bc356572c52a8ca4eeb2c4f31fdfdd4e6701e44dc6f
MD5 e2956d58c88fefed956a77996d220987
BLAKE2b-256 a2dc737de3a37cf7632a8b2d7d5a6e4c5d671e6490ec8a1a89d1fb3719a06f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for bili_scraper-0.1.2-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