Initial Upload
This commit is contained in:
parent
dad9413d7d
commit
2ab4db818d
1 changed files with 21 additions and 0 deletions
21
clipsDump.sh
Executable file
21
clipsDump.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while read STRING
|
||||||
|
do
|
||||||
|
clientid=$STRING
|
||||||
|
done < clientID.txt
|
||||||
|
|
||||||
|
url="$(curl -s -H 'Client-ID:'$clientid'' -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=37047880&first=100&started_at=2018-01-01T00:00:00Z&ended_at=2018-12-31T00:00:00Z' | jq -r '.data[] | .url')" > /dev/null
|
||||||
|
|
||||||
|
youtube-dl -o "/mnt/e/Videos/Twitch Clips/clipsOfTheYear/%(title)s.%(ext)s" $url
|
||||||
|
|
||||||
|
page="$(curl -s -H 'Client-ID:'$clientid'' -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=37047880&first=100&started_at=2018-01-01T00:00:00Z&ended_at=2018-12-31T00:00:00Z' | jq -r '.pagination.cursor')"
|
||||||
|
|
||||||
|
while [ $page != 'null' ]; do
|
||||||
|
url="$(curl -s -H 'Client-ID:'$clientid'' -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=37047880&first=100&started_at=2018-01-01T00:00:00Z&ended_at=2018-12-31T00:00:00Z&after='$page'' | jq -r '.data[] | .url')" > /dev/null
|
||||||
|
|
||||||
|
youtube-dl -o "/mnt/e/Videos/Twitch Clips/clipsOfTheYear/%(title)s.%(ext)s" $url
|
||||||
|
|
||||||
|
page="$(curl -s -H 'Client-ID:'$clientid'' -X GET 'https://api.twitch.tv/helix/clips?broadcaster_id=37047880&first=100&started_at=2018-01-01T00:00:00Z&ended_at=2018-12-31T00:00:00Z&after='$page'' | jq -r '.pagination.cursor')"
|
||||||
|
|
||||||
|
done
|
||||||
Loading…
Add table
Reference in a new issue