summaryrefslogtreecommitdiff
path: root/yt-feed
diff options
context:
space:
mode:
authorbtkoch <brandon@brandon-desktop.localdomain>2023-11-24 23:27:18 -0500
committerbtkoch <brandon@brandon-desktop.localdomain>2023-11-24 23:27:18 -0500
commitd6e4c4e9ad72d71cf01f835e03ffed100d69fccd (patch)
treeead59e9e48bbaa85bde42512e68ab89eaecba2f3 /yt-feed
parenta46f4b7f3bc8e5348c4baff2d831b9b2da038a80 (diff)
added README
Diffstat (limited to 'yt-feed')
-rwxr-xr-xyt-feed13
1 files changed, 13 insertions, 0 deletions
diff --git a/yt-feed b/yt-feed
new file mode 100755
index 0000000..98b19e2
--- /dev/null
+++ b/yt-feed
@@ -0,0 +1,13 @@
+#!/bin/bash
+if [ -z "$1" ]; then
+ echo "Usage: $0 [-i] <channel name (no @)>"
+ exit
+elif [[ $1 != -i ]]; then
+ url=$(curl -s "https://validator.w3.org/feed/check.cgi?url=https://youtube.com/@$1" | grep "Validator Results" | sed -n 's/.*Results: \(.*\)<\/title>.*/\1/p')
+ echo $url
+else [ $1 == -i ];
+ url=$(curl -s "https://validator.w3.org/feed/check.cgi?url=https://youtube.com/@$2" | grep "Validator Results" | sed -n 's/.*id=\(.*\)<\/title>.*/\1/p')
+ echo $url
+fi
+
+