Skip to content

已经在下游重构项目 https://github.com/sudoskys/Tool-Asoul-Music Bilibili视频下载收藏夹视频推送,抓取 ,推送到Onedrive|使用RSSHUB Bilibili video download and extract audio for wav and flac TG-RSS version video second-pass extraction and push.

License

Notifications You must be signed in to change notification settings

nonomal/BiliBiliVideoToMusic

 
 

Repository files navigation

BiliBiliVideoToMusic

由于哔哩哔哩风控,youget不能工作,本项目待修复,代码库仅供参考。

项目已经在下游重构并更容易部署!

https://github.com/sudoskys/Tool-Asoul-Music

counter

MIT License u s v

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

🛠 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

Notice

⚠ 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.

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
  • 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

⚠ 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.

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

⚠ 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.

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

v

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

🚧 See TODO for details

Thanks

Support

如果你觉得代码有点意思,可以通过无障碍赞助地址投喂我。

s


a

About

已经在下游重构项目 https://github.com/sudoskys/Tool-Asoul-Music Bilibili视频下载收藏夹视频推送,抓取 ,推送到Onedrive|使用RSSHUB Bilibili video download and extract audio for wav and flac TG-RSS version video second-pass extraction and push.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%