archive.is: Use fetch-uri and awk. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 634f56a96cf61092bb45da29b0b4e51c7150aa30 | |
parent d9db0701357bc01845ebf395c6034676b76b4e31 | |
Author: eidolon <?> | |
Date: Fri, 18 Oct 2024 17:27:51 -0400 | |
archive.is: Use fetch-uri and awk. | |
Signed-off-by: Annna Robert-Houdin <[email protected]> | |
Diffstat: | |
M annna-message-common | 12 ++---------- | |
M modules/tor/whitelist-from-tor | 1 + | |
2 files changed, 3 insertions(+), 10 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -173,16 +173,8 @@ case "${text}" in | |
fi | |
;; | |
*www.wsj.com/*|*www.ft.com/*|*www.nytimes.com/*) | |
- resp=$(unset -v PROXY; curl -A "$(http-user-agent)" -Igsm 10 -… | |
- respcode="${resp%%,*}" | |
- case "$respcode" in | |
- 302) | |
- nuri="${resp##*,}" | |
- nuris="archive: $nuri" | |
- ;; | |
- *) | |
- nuris="archive: $respcode" | |
- esac | |
+ archvuri=$(fetch-uri -h "https://archive.is/newest/$uri" | awk… | |
+ [ -n "$archvuri" ] && nuris="archive: $archvuri" | |
;; | |
*www.reddit.com*) | |
nuri="$(printf '%s\n' "${uri}" | sed "s;www.reddit.com;old.red… | |
diff --git a/modules/tor/whitelist-from-tor b/modules/tor/whitelist-from-tor | |
@@ -1,2 +1,3 @@ | |
www.forgottenweapons.com | |
forgottenweapons.com | |
+archive.is |