Skip to content

build: Use Firefox impersonation while checking links#1681

Merged
kroese merged 12 commits into
masterfrom
dev
Mar 23, 2026
Merged

build: Use Firefox impersonation while checking links#1681
kroese merged 12 commits into
masterfrom
dev

Conversation

@kroese
Copy link
Copy Markdown
Contributor

@kroese kroese commented Mar 23, 2026

No description provided.

kroese added 12 commits March 23, 2026 13:46
Added HTTP response code logging in the check function.
Updated the curl command to include a user-agent string for better compatibility.
Added steps to build and install curl-impersonate for both Firefox and Chrome versions in the GitHub Actions workflow.
Removed Chrome build and installation steps from the workflow.
Removed the build steps for curl-impersonate and replaced it with a direct installation command.
count=0
host=""
declare -A seen
wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.6.1/curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[yamllint] reported by reviewdog 🐶
[error] line too long (132 > 80 characters) (line-length)

check() {
local url="$1" http
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[yamllint] reported by reviewdog 🐶
[error] line too long (121 > 80 characters) (line-length)

http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000"
[[ "$http" == 2* ]] && return 0
http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[yamllint] reported by reviewdog 🐶
[error] line too long (127 > 80 characters) (line-length)

@kroese kroese merged commit 4d01a81 into master Mar 23, 2026
2 of 3 checks passed
@kroese kroese deleted the dev branch March 23, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant