Guest User

Untitled

a guest
Aug 14th, 2024
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1.     thing_counter=0
  2.     while read p; do
  3.         thing_counter=$(($thing_counter + 1))
  4.         if test -f "$p.txt"; then
  5.             continue
  6.         fi
  7.         echo $p $thing_counter
  8.         inurl='https://www.youtube.com/watch?v='
  9.         inurl="$inurl$p"
  10.         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" ;
  11.         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";
  12.         echo "" >> "$p.txt"
  13.         rm ./$p.en.srt
  14.     done < <(yt-dlp --flat-playlist --print id 'https://www.youtube.com/@FUWAMOCOch')
  15.  
Advertisement
Add Comment
Please, Sign In to add comment