1
This commit is contained in:
parent
703f276458
commit
3dd3d30a96
8187
allowed-channels/@7up545.txt
Normal file
8187
allowed-channels/@7up545.txt
Normal file
File diff suppressed because it is too large
Load Diff
57315
allowed.txt
57315
allowed.txt
File diff suppressed because it is too large
Load Diff
0
blocked-channels/.placeholder
Normal file
0
blocked-channels/.placeholder
Normal file
@ -1,6 +0,0 @@
|
||||
https://i.ytimg.com/vi/3rbcPeJPXTg
|
||||
https://i.ytimg.com/an_webp/3rbcPeJPXTg
|
||||
https://i.ytimg.com/sb/3rbcPeJPXTg
|
||||
https://youtu.be/3rbcPeJPXTg
|
||||
https://www.youtube.com/watch?v=3rbcPeJPXTg
|
||||
https://youtube.com/watch?v=3rbcPeJPXTg
|
1
collections/allowed-channels.txt
Normal file
1
collections/allowed-channels.txt
Normal file
@ -0,0 +1 @@
|
||||
https://www.youtube.com/@7up545/videos
|
0
collections/blocked-channels.txt
Normal file
0
collections/blocked-channels.txt
Normal file
33
scripts/collect-vids.sh
Normal file
33
scripts/collect-vids.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
function collect () {
|
||||
PREFIX="$1"
|
||||
VID_TEMPLATE_FILE="templates/vid-template.txt"
|
||||
TMP_FILE=$( mktemp )
|
||||
|
||||
echo "${TMP_FILE}"
|
||||
|
||||
cat ${PREFIX}-vids/*.txt | xargs -I{} sed -e "s@###VID###@{}@g" "${VID_TEMPLATE_FILE}" >> "${TMP_FILE}"
|
||||
cat ${PREFIX}-channels/*.txt | xargs -I{} sed -e "s@###VID###@{}@g" "${VID_TEMPLATE_FILE}" >> "${TMP_FILE}"
|
||||
|
||||
diff "${PREFIX}.txt" "${TMP_FILE}"
|
||||
RES="$?"
|
||||
|
||||
if [ "${RES}" -gt "0" ]
|
||||
then
|
||||
mv -vf "${PREFIX}.txt" "${PREFIX}.txt.old" && \
|
||||
cp -vf "${TMP_FILE}" "${PREFIX}.txt" && \
|
||||
rm -vf "${PREFIX}.txt.old"
|
||||
fi
|
||||
|
||||
rm -vf "${TMP_FILE}"
|
||||
|
||||
}
|
||||
|
||||
arr=("allowed" "blocked")
|
||||
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
collect "$i"
|
||||
done
|
@ -9,6 +9,7 @@ patterns << "https://i.ytimg.com/sb/###VID###"
|
||||
patterns << "https://youtu.be/###VID###"
|
||||
patterns << "https://www.youtube.com/watch?v=###VID###"
|
||||
patterns << "https://youtube.com/watch?v=###VID###"
|
||||
patterns << "https://music.youtube.com/watch?v=###VID###"
|
||||
|
||||
patterns.each do |p|
|
||||
puts("#{p.gsub("###VID###", vid)}")
|
11
scripts/get-channel-vids.sh
Executable file
11
scripts/get-channel-vids.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CHANNEL_URL="$1"
|
||||
|
||||
echo "${CHANNEL_URL}" |grep "^https\:\/\/www\.youtube\.com\/" >/dev/null
|
||||
if [ "$?" -eq "0" ]
|
||||
then
|
||||
yt-dlp -v --flat-playlist --print id "${CHANNEL_URL}"
|
||||
else
|
||||
echo "Missing a valid channel URL" >&2
|
||||
fi
|
7
templates/vid-template.txt
Executable file
7
templates/vid-template.txt
Executable file
@ -0,0 +1,7 @@
|
||||
https://i.ytimg.com/vi/###VID###
|
||||
https://i.ytimg.com/an_webp/###VID###
|
||||
https://i.ytimg.com/sb/###VID###
|
||||
https://youtu.be/###VID###
|
||||
https://www.youtube.com/watch?v=###VID###
|
||||
https://youtube.com/watch?v=###VID###
|
||||
https://music.youtube.com/watch?v=###VID###
|
Loading…
Reference in New Issue
Block a user