This commit is contained in:
Eliezer Croitoru committed 2024-08-18 05:14:09 +03:00
1 parent 703f276458
commit 3dd3d30a96
11 files changed
+65554 -12

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
all:
echo OK
collect:
bash scripts/collect-vids.sh
File diff suppressed because it is too large. Load diff
+57309 -6
View File
File diff suppressed because it is too large. Load diff
View File
Whitespace-only changes.
-6
View 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
View File
@@ -0,0 +1 @@
https://www.youtube.com/@7up545/videos
View File
Whitespace-only changes.
+33
View 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
View 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
View 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###