follows redirects on checking robots.txt

This commit is contained in:
YeongJun
2024-11-30 23:31:30 +09:00
committed by GitHub
parent 168522f34d
commit d5bae8759f

View File

@@ -74,7 +74,9 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) -
async with AsyncClient() as client:
try:
response = await client.get(
robot_txt_url, headers={"User-Agent": user_agent}
robot_txt_url,
follow_redirects=True,
headers={"User-Agent": user_agent},
)
except HTTPError:
raise McpError(