https://github.com/sudoskys/Tool-Asoul-Music
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.
🛠 MAIN can run on windows system, supports sticking music labels and optionally saving flv and wav files. (modify the file yourself...)
🚧 If you use action deployment, the function is only to extract flac. To configure this action, you need to add keys in the environment, one is token and the other is email. (Apply for github openapi token by yourself https://github.com/settings/tokens/new)
🎤 The sound quality should be the same as the video heard
⚠ Execute up to 20 push tasks each time.
⚠ Do not push super long videos (>10min) to avoid risks
⚠ Please do not deploy directly on the Github Action service, the yml of this repository is used for task flow usability testing
⚠ Liunx deploys RSS push see music.yml, the variables need to be configured manually.
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
linuxdown_git.py --->RSS auto editon
mains.py --->win&linux edition
⚠ The ONEdrive synchronization function has been added since version 220209. If this function is not required for Rss deployment, please comment the parameters of lmain and the onedrive class in it.
-
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
⚠ Pay attention to distinguish between two tokens.
- run Github action runs the process once a day at 6:20, and the repository owner plus stars will also trigger the process.
USE mains.py
Fill in data/userdata.yaml and run it.
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]
.
├── 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
- Implement download function
- Implement the function of fetching new entries
- Implement push function
- Realize multi-source multi-target push
🚧 See TODO for details
- BV number to AV number|Youget Repair Algorithm Implementation|
- O365 |Microsoft cloud disk synchronization implementation|
- RSShub |Data Feed RSS|
如果你觉得代码有点意思,可以通过无障碍赞助地址投喂我。