Giter VIP home page Giter VIP logo

u2bili's Introduction

youtube->bilibili 搬运脚本

STARS LICENSE LAST_COMMIT

Demo预览

Preview

🍔使用

预置环境 node16.x+python3+jq

  1. yarn或者npm install安装node依赖
  2. 安装yt-dlp 文档
  3. 提供cookies:通过 .env 提供或设置BILIBILI_COOKIE环境变量
  4. ./u2bili.sh <url>
关于获取Cookie

登录后F12,Application(应用程序)面板,选择cookie进行查看。 Cookie 以下方法选择一个即可:

  • 创建文件 .env,内容格式如下,填入你的变量值即可
DedeUserID: "xxxxxx"
DedeUserID__ckMd5: "xxxxxx"
bili_jct: "xxxxxx"
SESSDATA: "xxxxxx"

注意:虽然 .gitignore 里已经写上了 .env,但还是要提醒一下一定不要将 .env 文件 push 到远端,否则有账号被盗的危险。

  • 设置BILIBILI_COOKIE环境变量
BILIBILI_COOKIE环境变量格式如下:
DedeUserID=XXX;DedeUserID__ckMd5=XXX;bili_jct=XXX;SESSDATA=XXX

👆 大概三个月更新一次bili_jct和SESSDATA

🍱使用框架 Frameworks

  • yt-dlp
  • playwright
  • actionsflow

🧂Q&A

📺关于下载的清晰度

如有装有ffmpeg则会自动选择高画质视频和高画质音频然后合并。 yt-dlp文档 github.com/yt-dlp/yt-dlp#format-selection

🍥使用Github Action

❗重要提示:请clone后push到自己的私有仓库,使用额度内action时间!


Actions面板设置Secret BILIBILI_COOKIE (必要步骤)

DedeUserID=XXX;DedeUserID__ckMd5=XXX;bili_jct=XXX;SESSDATA=XXX

👆 Cookie有效期大概3个月(多设备异地登录会提前过期,所以建议使用小号,获取Cookie后本地浏览器删除Cookie不再登录)

几个重要参数

⚠免责声明

项目仅用于学习参考,如存在违反B站用户协议请使用者风险自负。

📜Licence

MIT

u2bili's People

Contributors

ame-yu avatar yuleicul 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.