From 0d0e841bff261dc694cd9a3f49ed7f39b929c985 Mon Sep 17 00:00:00 2001 From: Phantop Date: Fri, 21 Jun 2024 11:49:06 -0400 Subject: [PATCH] fish: make ytfluxfix actually work as intended --- fish/functions/ytfluxfix.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish/functions/ytfluxfix.fish b/fish/functions/ytfluxfix.fish index 9e4e5d9..c48ee3f 100644 --- a/fish/functions/ytfluxfix.fish +++ b/fish/functions/ytfluxfix.fish @@ -1,7 +1,7 @@ function ytfluxfix + set instances (curl https://redirect.invidious.io | pup noscript text{} | htmldecode | pup .instances-list a text{}) for i in (eval curl (cat ~/.config/miniflux)/categories/3/feeds | jq -rc '.[] | select(.parsing_error_count!=0)' | head -n15) - set instances (curl https://redirect.invidious.io | pup noscript text{} | htmldecode | pup .instances-list a text{}) - set url (trurl -s host=(echo $instances | shuf -n1) (echo $i | jq -r .feed_url)) + set url (trurl -s host=(random choice $instances) (echo $i | jq -r .feed_url)) set id (echo $i | jq -r .id) eval curl "$(cat ~/.config/miniflux)/feeds/$id" -X PUT -d @(jq -rn --arg feed_url $url '$ARGS.named' | psub) eval curl "$(cat ~/.config/miniflux)/feeds/$id/refresh" -X PUT