summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-18 17:55:00 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-18 17:55:00 +0200
commitc4bc0df99da917564bb6e402ee643f19a497bfdc (patch)
treee0431733c9c60362061f96eaa6133f0a13ac5100
parentd5158bec4773adc8b08b85fd9dfbc517ab2450c9 (diff)
simplified y2feed
-rwxr-xr-xbin/common/y2feed15
1 files changed, 4 insertions, 11 deletions
diff --git a/bin/common/y2feed b/bin/common/y2feed
index 196ecb7..e30bccf 100755
--- a/bin/common/y2feed
+++ b/bin/common/y2feed
@@ -1,12 +1,5 @@
#!/bin/sh
-ua="$(yt-dlp --dump-user-agent)"
-
-test -z "${url:=$1}" &&
- url="$(cat /dev/stdin)"
-
-url="http://youtube.com/$(echo "$url" |
- awk -F '/' '{print $NF}')"
-echo "url: $url" >&2
-
-curl -L -s -H "$ua" "$url" |
- pup 'link[title=RSS] attr{href}'
+echo "url: $1" >&2
+curl -L -s "$1" |
+ pup 'link[title=RSS] attr{href}' |
+ tee /dev/stderr