Optimize uri title grabbing. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 4c32a28ff193a33c9b29264f8d12502830c4c85a | |
parent 96e71cae9ee396ac53244ee5e9aa3c76ea872ac4 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Tue, 26 Dec 2023 23:10:06 +0100 | |
Optimize uri title grabbing. | |
Diffstat: | |
M annna-message-common | 12 ++++-------- | |
1 file changed, 4 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -70,10 +70,6 @@ case "${text}" in | |
;; | |
esac | |
- tmpf=$(mktemp) | |
- fetch-uri "${uri}" > "${tmpf}" | |
- urititle="$(grabtitle < "${tmpf}")" | |
- | |
# Set below and annna will concatenate at the end. | |
# Subtitle URI. | |
sturi="" | |
@@ -100,6 +96,10 @@ case "${text}" in | |
| sed "s,${host},youtube.com,")" | |
fi | |
+ tmpf=$(mktemp) | |
+ fetch-uri "${uri}" > "${tmpf}" | |
+ urititle="$(grabtitle < "${tmpf}")" | |
+ | |
case "${urititle}" in | |
"") | |
;; | |
@@ -107,10 +107,6 @@ case "${text}" in | |
annna-say -s "${server}" -c "${channel}" "Oh Günther! ❤ �… | |
uriexpansion=1 | |
;; | |
- "429 Too Many Requests"*) | |
- titleend=1 | |
- uriexpand=1 | |
- ;; | |
*\|\ Cloudflare*|"Just a moment...") | |
annna-say -s "${server}" -c "${channel}" "Mind your own busine… | |
titleend=1 |