Add imgur handler. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 6a224e810588f8216ec72b299f32cb79114a02a8 DIR parent da8e08a4ae67e37f37cb23b5aaf9ebe4e24e3b2f HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Fri, 23 Jul 2021 20:33:30 +0200 Add imgur handler. Diffstat: M annna-message-common | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -80,6 +80,10 @@ case "${text}" in nuris="$(printf '%s' "${uri}" | sed 's/blob/raw/')" nocuri=0 ;; + + *imgur.com/*) + nuris="$(youtube-dl -g "${uri}")" + ;; *lichess.org/????????|*lichess.org/????????/|*lichess.org/????????/black|*lichess.org/????????/white) nuris="$(printf "%s\n" "${uri}" \ | sed 's,https://lichess.org\(/[^ ]*\)$,\1,; s,^/\([^/]*\)/black$,/black/\1,; s,/white,,; s,\(.*\),https://lichess1.org/game/export/gif\1.gif,;')"