Introduction
Introduction Statistics Contact Development Disclaimer Help
Prevent annna from appending junk to NPR text-only URL. - annna - Annna the nic…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 260301fbc5c76eea9249df03a49e94305ac99a93
parent 9dd09d9f57283acb4c177775dc705f1932c892a7
Author: eidolon <?>
Date: Mon, 11 Mar 2024 14:41:19 -0400
Prevent annna from appending junk to NPR text-only URL.
A news item's ID is not consistently in the 7th '/'-delimited field.
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M annna-message-common | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -149,10 +149,10 @@ case "${text}" in
| sed 's,https://lichess.org\(/[^ ]*\)$,\1,; s,^/\([^/…
;;
*www.npr.org/*)
- post="$(printf '%s\n' "${uri}" | cut -d / -f 7)"
+ post="$(printf '%s\n' "${uri}" | sed -n 's@.*/\([0-9]\{10\}\)/…
if [ -n "${post}" ];
then
- nuri="https://text.npr.org/s.php?sId=${post}"
+ nuri="https://text.npr.org/${post}"
nuris="text only: ${nuri}"
fi
;;
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.