Advertisement
metalx1000

Get YouTube Video Titles

Nov 19th, 2024 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. url="https://www.youtube.com/watch?v=xDgwxYMmhGI"
  2.  
  3. wget -qO- "$url"|tr "," "\n"|grep '^"title":{"simpleText":"'|head -n1|cut -d\" -f6
  4.  
  5. wget -qO- "$url"|sed 's/,"/\n"/g'|grep '^"title":{"simpleText":"'|head -n1|sed 's/":"/\n/;s/"}$//;s/\\"/"/g'|tail -n1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement