Skip to content

fix: check robots.txt only for links that pass the enqueue filters - #4388

Open
nikitachapovskii-dev wants to merge 1 commit into
masterfrom
fix/robots-txt-after-enqueue-filters
Open

nikitachapovskii-dev wants to merge 1 commit into
masterfrom
fix/robots-txt-after-enqueue-filters

Conversation

@nikitachapovskii-dev

Copy link
Copy Markdown
Contributor

Closes #4385

addRequests checked every request against robots.txt before applying the enqueue strategy and the user's patterns. With respectRobotsTxtFile, enqueueLinks therefore fetched robots.txt for every origin a page links to, including the ones the default same-hostname strategy 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 onSkippedRequest with the reason filters instead of robotsTxt, 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikitachapovskii-dev nikitachapovskii-dev self-assigned this Nov 11, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enqueueLinks fetches robots.txt for links that the enqueue filters drop

1 participant