mirror of
https://gitea.phreedom.club/localhost_frssoft/peertube_torrent_url
synced 2024-11-14 15:43:16 +00:00
31 lines
713 B
Bash
Executable file
31 lines
713 B
Bash
Executable file
#!/bin/sh
|
|
|
|
domain='xxivproduction.video'
|
|
channel='regex'
|
|
count=100
|
|
|
|
|
|
peertube_api_get_channel_videos ()
|
|
{
|
|
curl -q "https://$domain/api/v1/video-channels/$channel/videos?count=$count&skipCount=true"
|
|
}
|
|
|
|
peertube_api_get_video ()
|
|
{
|
|
curl -q "https://$domain/api/v1/videos/$1"
|
|
}
|
|
|
|
echo 'Getting uuids...'
|
|
get_uuids=$(peertube_api_get_channel_videos | jj -l data.#.uuid | sed 's/"//g')
|
|
echo 'Done\n'
|
|
echo 'Getting names and magnet uri...'
|
|
for uuid in $get_uuids; do
|
|
video=$(peertube_api_get_video $uuid)
|
|
echo $video | jj name >> "$channel".md
|
|
echo '```' >> "$channel".md
|
|
echo $video | jj -l 'streamingPlaylists' | jj -l 'files.#.magnetUri' >> "$channel".md
|
|
echo '```' >> "$channel".md
|
|
sleep 1
|
|
done
|
|
echo 'Done'
|