Skip to content

Commit

Permalink
リンクチェックCI : 外部リンクチェックを高速化。2倍近くは速くなったはず
Browse files Browse the repository at this point in the history
  • Loading branch information
faithandbrave committed Oct 16, 2024
1 parent f1d9bfb commit 203d665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/script/link_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def retry_sleep():
def check_url(url: str, retry: int = 5) -> (bool, str):
try:
headers = {'User-agent': 'Mozilla/5.0'}
res = requests.get(url, headers=headers, verify=False, timeout=60.0)
res = requests.head(url, headers=headers, verify=False, timeout=60.0)
if res.url:
if res.url == url:
return res.status_code != 404, "404"
Expand Down

0 comments on commit 203d665

Please sign in to comment.