follows redirects on checking robots.txt
This commit is contained in:
parent
168522f34d
commit
d5bae8759f
1 changed files with 3 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) -
|
||||||
async with AsyncClient() as client:
|
async with AsyncClient() as client:
|
||||||
try:
|
try:
|
||||||
response = await client.get(
|
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:
|
except HTTPError:
|
||||||
raise McpError(
|
raise McpError(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue