Skip to content

Commit

Permalink
shorten http timeout for robots.txt fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
nanos committed Jun 25, 2024
1 parent dec718d commit 01a2719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion find_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def can_fetch(user_agent, url):
else:
try:
# We are getting the robots.txt manually from here, because otherwise we can't change the User Agent
robotsTxt = get(robots, ignore_robots_txt=True)
robotsTxt = get(robots, timeout = 2, ignore_robots_txt=True)
if robotsTxt.status_code in (401, 403):
ROBOTS_TXT[robots] = False
return False
Expand Down

0 comments on commit 01a2719

Please sign in to comment.