Skip to content

📺将你的b站信息和近期投稿视频更新到你的pinned Gist

License

Notifications You must be signed in to change notification settings

luyanci/bilibili-gist-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1000054481

Bilibili Gist Python

📺将你的b站信息和近期投稿视频更新到你的pinned Gist📺

中文|English

Update gist


📌✨ 更多像这样的 Pinned Gist 项目请访问:https://github.com/matchai/awesome-pinned-gists


使用

准备工作

  1. 创建一个公开的 GitHub Gist (https://gist.github.com/)

  2. 创建一个拥有 gist 权限的 token 并复制. (https://github.com/settings/tokens/new)

  3. 根据文档获取SESSDATA的值并复制(https://nemo2011.github.io/bilibili-api/#/get-credential)

部署

  1. fork本仓库

  2. 编辑 .github/workflows/main.yml 中的环境变量

  3. 前往仓库的 Settings > Secrets

  4. 点击 New repository secret 并添加如下仓库秘密 (repository secrets) :

    • GH_TOKEN: 刚才复制的 GitHub token
    • BILI_SESSDATA: 刚才复制的B站SESSDATA值
  5. 前往仓库的 Actions > Update gist 并点击 enable workflows

本地测试

  1. clone本仓库

  2. 输入以下命令安装依赖

pip install -r requirements.txt
  1. 复制.env.example文件,更名为.env,并按照文件内容填写即可

  2. 输入以下命令,进行测试

py gist.py

工作原理

  • 使用bilibili-api-python来获取相关信息

  • 利用Github Actions自动更新Gist

灵感&帮助

bilibili-api-python

bilibili-box

chess-com-box-py

许可

本仓库使用了MIT开源协议证书

 The MIT License (MIT)
 Copyright (c) 2024 luyanci

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 OR OTHER DEALINGS IN THE SOFTWARE.

About

📺将你的b站信息和近期投稿视频更新到你的pinned Gist

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages