diff options
author | Patrick Spek <p.spek@tyil.nl> | 2021-01-25 05:13:06 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-08-14 11:59:45 +0200 |
commit | 68f9a5cb23e590a4ea585d36d3e1057f99e25886 (patch) | |
tree | 66e032fd7b0663392e9de5a91a333062020136e4 /.local/bin/ytrss | |
parent | 6f4a071ae423c30ce06bef35b04ed56128782345 (diff) |
Update ytrss
Diffstat (limited to '.local/bin/ytrss')
-rwxr-xr-x | .local/bin/ytrss | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.local/bin/ytrss b/.local/bin/ytrss index b0cf678..830abc8 100755 --- a/.local/bin/ytrss +++ b/.local/bin/ytrss @@ -23,8 +23,12 @@ main() for url in $@ do curl -s "$url" \ - | grep -Eo 'https://www.youtube.com/feeds/videos.xml?[^"]+' + | grep -Eo 'https://www.youtube.com/feeds/videos.xml?[^"]+' \ + | head -n1 done + + # An alternate solution to grep -E + # perl -n -e 'm@(https://www.youtube.com/feeds/videos.xml\?[^"]+)@ and print "$1\n"' } opts() |