下载 bili-conv.js 到本地,需安装依赖xml2js
npm i xml2js
| #!/bin/bash | |
| main_list_file="$1" | |
| base_dir="$2" | |
| cd $base_dir | |
| while : | |
| do | |
| dir=`shuf $main_list_file | head -1` | |
| echo 'dir: ' "$dir" |
| #!/bin/bash | |
| dir="/_ds3617xs/bilibili" | |
| file_list=`find $dir -name "*.flv" | shuf | head -n 30` | |
| list_file="$dir/live$1.list" | |
| echo > $list_file | |
| ass_file_list="" | |
| for file in $file_list; do |
| #!/bin/bash | |
| main_list_file="$1" | |
| base_dir="$2" | |
| lock_file="$base_dir/live.lock" | |
| cd $base_dir | |
| dir='' | |
| function onExit() { |
| #!/bin/bash | |
| base_dir="/_ds3617xs/bilibili/" | |
| cd $base_dir | |
| youget="/usr/local/bin/you-get" | |
| rank_list=`curl -s $1 -L -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36' | egrep 'https://www\.bilibili\.com/video/av[0-9]*' -o | shuf` | |
| for b in $rank_list; do |
| #EXTM3U name="bj-unicom-iptv" | |
| #EXTINF:-1,CCTV1 | |
| rtp://239.3.1.1:8000 | |
| #EXTINF:-1,CCTV2 | |
| rtp://239.3.1.2:8004 | |
| #EXTINF:-1,CCTV4 | |
| rtp://239.3.1.4:8216 | |
| #EXTINF:-1,CCTV7 | |
| rtp://239.3.1.7:8024 | |
| #EXTINF:-1,CCTV9 |