/python-mpv-bilibili

Easy way use mpv to play bilibili video

Primary LanguagePythonMIT LicenseMIT

Python-Mpv-Bilibili

Use python call mpv.exe to play >>> Better quality videos <<< from bilibili

More specific content can go to my GitHub page

This is a simple explanation

Purpose

1. Solve the cumbersome steps that need to be performed every time the mpv player is called.
2. There are many you-get command line tutorials, but there are relatively few ways to write py files, so I write them for the convenience of those who need them.

Start

The first is to obtain cookies. I use Google’s extension EditThisCookie. After logging in to bilibili, enter the video playback page, right-click on the blank space and select EditThisCookie, select the wrench (settings), select options, find Choose the preferred export format for cookies, and select Netscape HTTP Cookies File, then return to the previous page to export cookies, create a new cookies.txt file, and paste it in.

Then don't need say more about the others, because it is clearly written in the comments of the py file. If you still have questions, look at the above link that github page~

Remaining problems

1. The bilibili video Danmaku will be downloaded automatically, I cannot solve.
2. It's not automatic. I set the opening method to IDLE, and then F5 to run it. The speed is relatively fast. Others such as vscode and prcharm are relatively slow.


if you can resolve, looking forward to your help~

Other

You also can use "mpv https://www.bilibili.com/video/xxxxxxx" play video.

Sure,it's easier but low quality~