Show link to text-only NPR pages - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit 7141cf206b96263253973f17837a2bbf4efc638b
(DIR) parent 99f37ea8067acb04d580cb87979e39357c2bf6ad
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 4 Aug 2020 22:12:18 +0200
Show link to text-only NPR pages
Standard parsing is blocked by data-protection splash page, for example:
https://choice.npr.org/index.html?origin=https://www.npr.org/
Signed-off-by: Annna Robert-Houdin <annna@bitreich.org>
Diffstat:
M annna-start-services | 8 ++++++++
1 file changed, 8 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-start-services b/annna-start-services
@@ -131,6 +131,14 @@ annna_common() {
nuris="$(printf '%s' "${uri}" | sed 's/blob/raw/')"
nocuri=0
;;
+ *www.npr.org/*)
+ post="$(printf '%s\n' "${uri}" | cut -d / -f 7)"
+ if [ -n "${post}" ];
+ then
+ nuri="https://text.npr.org/s.php?sId=${post}"
+ nuris="text only: ${nuri}"
+ fi
+ ;;
*)
mimetype="$(file -b --mime-type "${tmpf}")"
case "${mimetype}" in