Repository navigation
fix: check robots.txt only for links that pass the enqueue filters - #4388
Open
nikitachapovskii-dev wants to merge 1 commit into
Open
nikitachapovskii-dev wants to merge 1 commit into
nikitachapovskii-dev wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4385
addRequestschecked every request against robots.txt before applying the enqueue strategy and the user's patterns. WithrespectRobotsTxtFile,enqueueLinkstherefore fetched robots.txt for every origin a page links to, including the ones the defaultsame-hostnamestrategy then drops, all inside the request handler. A page that links to slow or unreachable sites timed out on these fetches.The check now runs after the filters, on the request that passes them.
One visible change: a URL that fails both a filter and robots.txt is now reported to
onSkippedRequestwith the reasonfiltersinstead ofrobotsTxt, and no longer counts in the robots.txt skip warning.Tests: a new test adds three URLs with
respectRobotsTxtFile: one kept, one excluded, and one on another hostname. It checks that robots.txt is looked up only for the kept one. It fails without the fix (all three are looked up) and passes with it.