diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-18 17:55:00 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-18 17:55:00 +0200 |
commit | c4bc0df99da917564bb6e402ee643f19a497bfdc (patch) | |
tree | e0431733c9c60362061f96eaa6133f0a13ac5100 /bin | |
parent | d5158bec4773adc8b08b85fd9dfbc517ab2450c9 (diff) |
simplified y2feed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common/y2feed | 15 |
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 |