Crawl free videos from station B--get the python code quickly

First install the you_get
installation code under the terminal :

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn you_get

Insert picture description here

For example, I want to download "Jay Chou Concert All the Way North" This is a video I like very much. The
address is this:
https://www.bilibili.com/video/BV1mD4y1U7z9?from=search&seid=4327767601354034815

Upload code

import sys
import you_get

def download(url, path):
    sys.argv = ['you-get', '-o', path, url]
    you_get.main()

if __name__ == '__main__':
    # 要下载的视频地址
    url = 'https://www.bilibili.com/video/BV1mD4y1U7z9?from=search&seid=4327767601354034815'
    # 视频保存的位置
    path = 'G:/hanhanw'

download(url, path)

Operation result
This means that the download is complete!
Insert picture description here
Open our download path, find the ".flv file" and right click, you can choose iQiyi to play. If you don't have iQiyi, you can try other players. I tried iQiyi's and the experience is very good. ! It feels cool to listen to it with headphones. . .
Insert picture description here
Hahaha looks pretty good, you can download it when you don’t have the internet when you encounter a favorite.
Insert picture description here

This file should be a bullet screen. I opened it and looked at it. It was a bullet screen hahahaha
Insert picture description here

Guess you like

Origin blog.csdn.net/hanhanwanghaha/article/details/108640380