Get forgottenweapons video link. - 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 738fe32144c11085af506b996a931c95edd63e36 DIR parent 2bb172e94b0121c21f4295759d52cf2d7ed428b9 HTML Author: eidolon <?> Date: Wed, 16 Oct 2024 11:46:12 -0400 Get forgottenweapons video link. Signed-off-by: Annna Robert-Houdin <annna@bitreich.org> Diffstat: M annna-message-common | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -164,6 +164,10 @@ case "${text}" in nuris="text only: ${nuri}" fi ;; + *www.forgottenweapons.com/*) + resp=$(curl -sgfm 5 "$uri" | sed -n '/<meta name="description"/ s/.*\(https:\/\/youtu\.be\/[-A-Za-z0-9_]\{11\}\).*/\1/p') + [ -n "$resp" ] && nuris="video: ytdl://${resp##*/}" + ;; *www.wsj.com/*|*www.ft.com/*|*www.nytimes.com/*) resp=$(unset -v PROXY; curl -A "$(http-user-agent)" -Igsm 10 -o /dev/null -w '%{response_code},%{redirect_url}\n' "https://archive.is/newest/$uri") respcode="${resp%%,*}"