GithubHelp home page GithubHelp logo

bilibili-gist-py's Introduction

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)

  4. 在B站个人空间的链接中找到 UID (https://space.bilibili.com/282873551)

部署

复刻使用

  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

Action使用

复制此模板到你的workflow即可

        - name: Update gist
          uses: luyanci/bilibili-gist-py@master
          with:
            ghtoken: ${{ secrets.GH_TOKEN }}
            gistid: 181a99b82ae47d3a6fccbd126f9d93ef
            sessdata: ${{ secrets.BILI_SESSDATA }}
            biliuid: '282873551' #不能删除引号,否则在长uid下会报错

本地测试

  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.

bilibili-gist-py's People

Contributors

luyanci avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.