Last active
May 26, 2019 01:10
-
-
Save dardo82/3ea05405481dbffe8b8f1013f8f0b5cf to your computer and use it in GitHub Desktop.
YT to VideoIndexer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
API="https://api.videoindexer.ai/auth/trial/Accounts/be4863e0-b5be-416d-9de2-91dbdd0afd11" | |
TOKEN=$(curl -s -H "Ocp-Apim-Subscription-Key:5ebebe8abada42c4a04065544942edf5" "$API/AccessToken?allowEdit=true" | tr -d \") | |
NAME=$(youtube-dl --get-title $1 | tr \ _); URL=$(curl -s "https://tinyurl.com/api-create.php?url=$(youtube-dl -g -f mp4 $1)") | |
curl -s -X POST -H "Content-Length:0" "${API//\/auth/}/Videos?language=auto&name=$NAME&videoUrl=$URL&accessToken=$TOKEN" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment