YouTuber is an alternate frontend for youtube using the unix philosophy and the torture of regex
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
YouTuber/ytmeta.sh

17 lines
377 B

#!/bin/bash
if [ "${1#*$'watch?v='}" != "$1" ]
then
VIDID=`echo $1|awk -F '=' '{print $NF}'`
else
VIDID=`echo $1|awk -F '/' '{print $NF}'`
fi
printf https://img.youtube.com/vi/$VIDID/0.jpg\;
printf "`curl -s https://www.youtube.com/watch?v=$VIDID|tr "\<" "\n"|grep -e "og:title"|cut -d'"' -f4|tr -d '[:punct:]'`"
printf \;
echo https://www.youtube.com/watch?v=$VIDID\;