From 75165ef15c6403b9d4ecaa05070d83f23939edee Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 23 Mar 2026 15:01:38 +0100 Subject: [PATCH] Simplify curl-impersonate installation in workflow Removed the build steps for curl-impersonate and replaced it with a direct installation command. --- .github/workflows/links.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index f118bca..c99794c 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -21,25 +21,6 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 - - - name: Build curl-impersonate - run: | - sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool - # For the Firefox version only - sudo apt install python3-pip libnss3 - pip install gyp-next - export PATH="$PATH:~/.local/bin" # Add gyp to PATH - git clone https://github.com/lwthiker/curl-impersonate.git - cd curl-impersonate - mkdir build && cd build - ../configure - # Build and install the Firefox version - make firefox-build - sudo make firefox-install - # You may need to update the linker's cache to find libcurl-impersonate - sudo ldconfig - # Optionally remove all the build files - cd ../ && rm -Rf build - name: Validate Links run: | @@ -47,11 +28,12 @@ jobs: count=0 host="" declare -A seen + sudo apt-get install curl-impersonate check() { local url="$1" http - http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000" + http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000" [[ "$http" == 2* ]] && return 0 - http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" + http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" printf '%s\n' "HTTP: $http" [[ "$http" == 2* ]] }