Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thing_counter=0
- while read p; do
- thing_counter=$(($thing_counter + 1))
- if test -f "$p.txt"; then
- continue
- fi
- echo $p $thing_counter
- inurl='https://www.youtube.com/watch?v='
- inurl="$inurl$p"
- yt-dlp --cookies cookies.txt --skip-download --write-subs --write-auto-subs --sub-lang en --sub-format ttml --convert-subs srt --output "$p.%(ext)s" "$inurl" ;
- cat ./$p.en.srt | sed '/^$/d' | grep -v '^[0-9]*$' | grep -v '\-->' | sed 's/<[^>]*>//g' | sed -r 's/\[\w*\]//g' | tr -c '[:graph:]\n' ' ' | sed -r 's/^\s+//' | sed -r 's/\s+$//' | tr -s ' ' | tr '\n' ' ' | tr -s ' ' > "$p.txt";
- echo "" >> "$p.txt"
- rm ./$p.en.srt
- done < <(yt-dlp --flat-playlist --print id 'https://www.youtube.com/@FUWAMOCOch')
Advertisement
Add Comment
Please, Sign In to add comment