Created
February 11, 2020 08:11
-
-
Save zwh8800/a42d853e0c623bec73fb0efe1d3506c4 to your computer and use it in GitHub Desktop.
pull-bilibili.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
echo $b | |
av="${b//https:\/\/www\.bilibili\.com\/video\//}" | |
echo $av | |
$youget -c /_ds3617xs/live/cookies.sqlite -F flv720 $b -O $av | |
xml_file=`ls *.xml -c | head -n 1` | |
if [[ $xml_file != av* ]] ; | |
then | |
mv "$xml_file" "$av.xml" | |
node /home/zzz/bili-conv/main.js "$av.xml" > "$av.ass" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment