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
Author
start
You can install it using the pip install bili-scraper command
Demo
from bili_scraper import BiliScraper
import json
if __name__ == '__main__':
bilibili = BiliScraper()
# with open('cookie.json', 'r') as f:
# cookie = json.load(f)
# bilibili.set_cookies(cookie)
bilibili.Login()
with open('cookie.json', 'w') as f:
json.dump(dict(bilibili.getCookie()), f)
bilibili.getVideo('BV15bdmBNEZr', output_dir='./video', quick_splicing=True)
comments = bilibili.getVideoComments('BV15bdmBNEZr', './img', 1)
with open("comments.json", "w", encoding="utf-8") as f:
json.dump(comments, f, ensure_ascii=False)
dm = bilibili.getVideoDm("BV15bdmBNEZr")
with open('dm.json', 'w', encoding='utf-8') as f:
json.dump(dm, f, ensure_ascii=False)
bilibili.getArticle("1199888451663560745", 'doc', 'doc.docx', './article/img/')
Thanks
This project uses code from:
- bilibili-API-collect by [@SocialSisterYi], licensed under CC-BY-NC 4.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bili_scraper-0.2.1.tar.gz.
File metadata
- Download URL: bili_scraper-0.2.1.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e59bd4b272ff0cb20afd7875d99d7b22fd5e0fc0e81e975aa09ef5fa0c41921
|
|
| MD5 |
7240d3e67df7e6dda197926a21eee667
|
|
| BLAKE2b-256 |
e508968f8e44cbfce270a7549959d70f5345fb3c6ae1c68289b3c20d0f82aac7
|
Provenance
The following attestation bundles were made for bili_scraper-0.2.1.tar.gz:
Publisher:
python-publish.yml on Guoziqi329/bili-scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bili_scraper-0.2.1.tar.gz -
Subject digest:
3e59bd4b272ff0cb20afd7875d99d7b22fd5e0fc0e81e975aa09ef5fa0c41921 - Sigstore transparency entry: 1508507579
- Sigstore integration time:
-
Permalink:
Guoziqi329/bili-scraper@030f91e66359aaa55cf58953e1041996a3b518e4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Guoziqi329
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@030f91e66359aaa55cf58953e1041996a3b518e4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bili_scraper-0.2.1-py3-none-any.whl.
File metadata
- Download URL: bili_scraper-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a5f4bfbcacd98eace95ac46be8921318249ebf44eb993b6757a5208a1232207
|
|
| MD5 |
3d5c3b18c20eb563c1bcd7fa68e44445
|
|
| BLAKE2b-256 |
e9fece6be324435febc7a0a6f89839d3fb8bb0e2cb27911b506b9d2b9ee6fec2
|
Provenance
The following attestation bundles were made for bili_scraper-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on Guoziqi329/bili-scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bili_scraper-0.2.1-py3-none-any.whl -
Subject digest:
0a5f4bfbcacd98eace95ac46be8921318249ebf44eb993b6757a5208a1232207 - Sigstore transparency entry: 1508507774
- Sigstore integration time:
-
Permalink:
Guoziqi329/bili-scraper@030f91e66359aaa55cf58953e1041996a3b518e4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Guoziqi329
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@030f91e66359aaa55cf58953e1041996a3b518e4 -
Trigger Event:
release
-
Statement type: