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.0.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.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bili_scraper-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ee0740e45b031abf86647ada221c4951030ef16ca953e840d6df8a9a6e343f69
MD5 3c2eb261ad156e77bb32925d5eec4dc2
BLAKE2b-256 f050ffa49383cef0f27c9bd117240bb2d1db79cee5336a3f044afda4b3458d90

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: bili_scraper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aef95674583009444ab6ac3a69940e48b3b8714ea016b3b46d5cf3fe98a77a15
MD5 188454fdd36376556559d0000b52fb42
BLAKE2b-256 351592ef3e3cce10b67042805c4d7c7fe77cd57deb190677aed0185acb08a318

See more details on using hashes here.

Provenance

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