docs: add crawling best practices #4590
Merged
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.
In the fallout of issue #4588 I was in the FSF IRC channel and discussed the issue and we discussed about potential solutions. cURL`s user agent is also blocked by many servers. The reason is, that bad implemented crawlers can be identified by it.
I offered, that we can add a page in to the documentation regarding crawling and that we recommend to change the user agent to some random value, but that would not solve potential bots which ignore robots.txt.
It was further discussed, that doing a curl request against 'bgp.tools'
curl https://bgp.toolsresults in following response:I used this information to write a reasonable documentation page regarding crawling.
I used chatGPT and claude to refine the text.
I just added the test to ensure that my example in the doc is not a fantasy, lol.
Realistically seen, the default user agent can always be banned. We should anyway recommend to use a custom user agent. And instead of giving some recommendation like "generate something random as user agent" we give them some reasonable guidance. A malicious crawler will anyway use some fake user agent and a valid crawler will set a reasonable user agent.