Skip to content

Instantly share code, notes, and snippets.

@kirkins
Last active July 17, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirkins/d161e3dfc6b17bb348ad3c39e223117a to your computer and use it in GitHub Desktop.
Save kirkins/d161e3dfc6b17bb348ad3c39e223117a to your computer and use it in GitHub Desktop.
Get Random Youtube from Hooktube on bash
#!/bin/bash
printf "https://youtube.com/"
URL="https://hooktube.com/random?$((1 + RANDOM % 100000000))"
curl $URL -s -L -I -o /dev/null -w '%{url_effective}' \
| cut -d "/" -f 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment