mirror of
https://github.com/seanbetts/steam-hardware-watch.git
synced 2026-10-06 04:04:22 +02:00
Unblock Komodo hardware watch checks
This commit is contained in:
1 parent
e5e1c6e7db
commit
b269b90007
6 files changed
+53
-15
No files matched your search
@@ -55,12 +55,15 @@ maybe_set_cdp_endpoint() {
|
||||
|
||||
load_local_env
|
||||
|
||||
KOMODO_USER_AGENT="${KOMODO_USER_AGENT:-Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36}"
|
||||
export KOMODO_USER_AGENT
|
||||
|
||||
fetch_json() {
|
||||
name="$1"
|
||||
url="$2"
|
||||
allow_fallback="${3:-1}"
|
||||
tmp="$OUT_DIR/$name.json.tmp"
|
||||
if curl -A 'Mozilla/5.0' --retry 1 --retry-delay 1 --max-time 12 -fsSL "$url" > "$tmp" 2>/dev/null \
|
||||
if curl -A "$KOMODO_USER_AGENT" --retry 1 --retry-delay 1 --max-time 12 -fsSL "$url" > "$tmp" 2>/dev/null \
|
||||
&& jq empty "$tmp" >/dev/null 2>&1; then
|
||||
mv "$tmp" "$OUT_DIR/$name.json"
|
||||
return 0
|
||||
|
||||
Reference in new issue
Block a user