Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Robots File Parser #601

Closed
wants to merge 4 commits into from
Closed

Conversation

addie9800
Copy link
Collaborator

Draft for now. This would be a possible implementation for a CustomRobotFileParser inheriting from RobotFileParser from the robotspy package. It looks like a lot, but is mostly copy-pasted from the library codebase. Request-Rate can be implemented analogously. Note that the our code can be reduced by also using the functions from RobotFileParser directly, but that would usually lead to us iterating over objects twice. E.g. in the parse_tokens() function, we could just parse the agents and crawl-delay and then call super().parse_tokens() taking care of the rest, but to me that seems like unnecessary double processing.

@addie9800 addie9800 marked this pull request as draft September 3, 2024 13:07
Base automatically changed from add-robots-text-parser to master September 3, 2024 16:17
@MaxDall MaxDall closed this in #609 Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants