BiliBiliVideoToMusic
由于哔哩哔哩风控,youget不能工作,本项目待修复,代码库仅供参考。
项目已经在下游重构并更容易部署!
https://github.com/sudoskys/Tool-Asoul-Music
English | 中文
introduce
Bilibili video download and extract audio for wav and flac TG-RSS version video second-pass extraction and push. This project allows you to synchronize the music of your favorite erchuang video to the specified TG group and also onedrive bussines, using RShub to provide data support.
Features
Notice
Start
1. Installation Requirements
Python 3.7 or higher
python -m pip install --upgrade pip
pip install setuptools wheel twine bs4 requests tabulate mutagen pydub you_get moviepy pyTelegramBotAPI feedparser
- FFmpeg environment ffmpeg. (This repository Action uses https://github.com/marketplace/actions/setup-ffmpeg )
- Install necessary packages locally by running
pip install bs4 requests tabulate mutagen pydub you_get moviepy
- Push service installation robot API library and RSS parsing library
pip install pyTelegramBotAPI feedparser
2. Preparation
select file version
linuxdown_git.py --->RSS auto editon
mains.py --->win&linux edition
RSS feed users
-
source (gitPush.py) You need to build Rsshub to get web sources, or use the services of public projects! See .
-
Fork this repository and set secrets Tips: If you use action deployment, it is recommended to only set extraction flac. To configure this action, you need to add secrets to the environment, one is github token and the other is email. (Apply for github openapi token
Add Repository secrets
>token
>objectID
>rssurl
>apptoken
>appid
>appkey
token = ***** # bot token, use tg@BotFather, google by yourself
objectID = ***** # channal id ,please use tg@getidsbot get this value!
rssurl = **** # rssurl, see https://docs.rsshub.app/
----
appid, appkey, and apptoken are synchronously used by Microsoft cloud disk. You need to obtain these quantities from Azure, and the token should be automatically generated by running test/tokensetup!
Comment out if this feature is not required!
Add Environment secrets
>token # github token, use https://github.com/settings/tokens/new
>email # your email address
- run Github action runs the process once a day at 6:20, and the repository owner plus stars will also trigger the process.
Standalone use
USE mains.py
Fill in data/userdata.yaml and run it.
Implementation logic (gitPush.py)
For the specific code, see gitPush.py (main.py is used in the windows environment) Pull RSS-->Compare data + input data-->Calculate the updated data-->Incoming download extraction function-->Send file-->Delete file tree
RSSdata is an independent storage worker, associated with the main program by rssdata.yaml
graph TB
A(pull RSS)--Comparison input--> B[data]
B[data] --> C{Calculate updated entry?}
C{Calculate updated entry?} -- NEW --> D[Download Extract]
C{Compute updated entry?} -- NO new --> S
D[Download Extraction] --Push --> E[TG]
E -- delete data if successful --> B
E[TG] --> S[write report]
Directory structure description
.
├── data
│ ├── public.cer //public key
│ ├── rssdata.yaml //automatically filled in
│ └── userdata.yaml // manually filled in
├── docs //documentation
│ └── workflow.png
├── err.txt //Local debugging error log
├── LICENSE //Protocol
├── LICENSE.txt
├── linuxdown_audio.py // rss test version, playlist download, because the api is limited
├── gitPush.py // rss push version, github action run target
├── log.txt
├── main.py // Interactive download version available for both linux & win
├── mods
│
│ │
│ └── rsatool.py //rsa support
├── o365_token.txt //encrypted token, decrypted at runtime
├── README-CN.md
├── README.md
├── requirements.txt
├── targets.txt
└── test
├── err.txt
├── log.txt
├── tokensetup.py //token settings are automatically generated
└── t_video.py
TODO
- Implement download function
- Implement the function of fetching new entries
- Implement push function
- Realize multi-source multi-target push
contribute
Thanks
- BV number to AV number|Youget Repair Algorithm Implementation|
- O365 |Microsoft cloud disk synchronization implementation|
- RSShub |Data Feed RSS|
Support
如果你觉得代码有点意思,可以通过无障碍赞助地址投喂我。