Advertisement
LeDevBreton

parse html youtube

Dec 16th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. url=$1
  4.  
  5. txt=$(wget -q $url -O - | awk -F '"shortDescription"' '{print $2}')
  6. txt=$(echo $txt | awk -F ':"' '{print $2}')
  7. txt=$(echo $txt | awk -F 'https' '{print $2}')
  8. txt="https${txt}"
  9. txt=$(echo $txt | awk -F 'view' '{print $1}')
  10.  
  11. echo $txt
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement