summaryrefslogtreecommitdiff
path: root/bin/common/y2feed
diff options
context:
space:
mode:
Diffstat (limited to 'bin/common/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