From efbc3e874da1a6486201900e9a3e858c4f0bbec7 Mon Sep 17 00:00:00 2001 From: Phantop Date: Tue, 2 Jul 2024 13:00:50 -0400 Subject: [PATCH] fish: use better instances for ytfluxfix --- fish/functions/ytfluxfix.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/functions/ytfluxfix.fish b/fish/functions/ytfluxfix.fish index c48ee3f..c4c3db9 100644 --- a/fish/functions/ytfluxfix.fish +++ b/fish/functions/ytfluxfix.fish @@ -1,5 +1,5 @@ function ytfluxfix - set instances (curl https://redirect.invidious.io | pup noscript text{} | htmldecode | pup .instances-list a text{}) + set instances (curl https://api.invidious.io/instances.json | jq -r '.[] | select(.[1].type == "https" and .[1].monitor.uptime >= 99) [0]') for i in (eval curl (cat ~/.config/miniflux)/categories/3/feeds | jq -rc '.[] | select(.parsing_error_count!=0)' | head -n15) set url (trurl -s host=(random choice $instances) (echo $i | jq -r .feed_url)) set id (echo $i | jq -r .id)