Fix golang download website hash match pattern

This commit is contained in:
crazywhalecc 2026-02-04 15:12:19 +08:00
parent 38f742156d
commit b5c14d6f26
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -47,7 +47,7 @@ class go_xcaddy
}
$version_regex = str_replace('.', '\.', $version);
$pattern = "/href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
$pattern = "/class=\"download\" href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
if (preg_match($pattern, $page, $matches)) {
$hash = $matches[1];
} else {