fetch scripts for some channels

This commit is contained in:
2025-06-06 18:31:26 +05:00
parent 67a1e3dccc
commit c7208f9178
3 changed files with 21 additions and 0 deletions

9
fetchscripts/fetch-all.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
echo "return 302 $(./youtubelive-to-m3u.sh dhaaristv);" > ../nginx/redirects/dhaaristv.conf
echo "return 302 $(./youtubelive-to-m3u.sh EmanChannelTV);" > ../nginx/redirects/emanchannel.conf
echo "return 302 $(./youtubelive-to-m3u.sh SaudiQuranTv);" > ../nginx/redirects/makkahlive.conf
echo "return 302 $(./madhinalive-to-m3u.sh);" > ../nginx/redirects/madhinalive.conf
echo "return 302 $(./youtubelive-to-m3u.sh sanguTVMV);" > ../nginx/redirects/sangutv.conf

View File

@@ -0,0 +1,5 @@
#!/bin/bash
VIDEO_ID=$(curl -s https://makkahlive.net/madinalive.aspx | grep -o "videoid= '[^']*'" | head -n1| cut -d"'" -f2)
yt-dlp -g -f b $(echo https://www.youtube.com/watch?v=$VIDEO_ID)

View File

@@ -0,0 +1,7 @@
#!/bin/bash
CHANNEL_ID="$1"
VIDEO_ID=$(curl -sL https://www.youtube.com/@$CHANNEL_ID/streams | grep "Tap to watch live" | sed 's/.*\/watch?v=\([^\\]*\).*/\1/')
yt-dlp -g -f b $(echo https://www.youtube.com/watch?v=$VIDEO_ID)