dotfiles

<-- duh.
git clone https://hhvn.uk/dotfiles
git clone git://hhvn.uk/dotfiles
Log | Files | Refs | Submodules | LICENSE

meta (636B)


      1 content=$(curl -L "$(echo "$1" | sed 's/invidio.us/www.youtube.com/g;s~embed/~watch?v=~g')")
      2 title=$(echo "$content" | grep '\[{\"videoPrimaryInfoRenderer\":{\"title\":{\"runs\"\:\[{\"text\":' | sed 's/.*\[{\"videoPrimaryInfoRenderer\":{\"title\":{\"runs\"\:\[{\"text\":// ; s/}\]}.*// ; s/\\//g ; s/^\"// ; s/.$//')
      3 author=$(echo "$content" | grep -o 'author":[^}]*}' | sed -E 's/.*:"([^"]*).*/\1/g')
      4 uploaded=$(echo "$content" | grep -o 'uploadDate":[^}]*}' | sed -E 's/.*:"([^"]*).*/\1/g;s/([0-9]*)-([0-9]*)-([0-9]*)/\3-\2-\1/')
      5 
      6 printf 'Title:    %s\n' "$title"
      7 printf 'Author:   %s\n' "$author"
      8 printf 'Uploaded: %s\n' "$uploaded"