Protego is a pure-Python robots.txt parser with support for modern conventions like those defined by Google. As of version 0.6.0, it actively supports Python 3.10 and newer, with regular updates aligning with new Python releases. It is widely used for web scraping and compliance checking.
pip install protegoVerified import paths — ran on the pinned version, not inferred.
Initialize the parser with robots.txt content and check URL access permissions for a specific user agent, retrieve crawl delay, and sitemaps.
Upgrade to Python 3.10+ or pin Protego to a version <0.6.0 (e.g., `protego<0.6.0`).
Upgrade to Python 3.9+ or pin Protego to a version <0.4.0.
Upgrade to Python 3.8+ and remove `six` if it was only a Protego dependency. Pin Protego to a version <0.3.0 for older Python environments.
Ensure that the `robotstxt_body` passed to `Protego.parse()` is always a string.
Upgrade to Protego 0.1.16 or newer to ensure correct interpretation of absolute URLs in `robots.txt` directives.
Avoid importing internal modules; rely only on the documented public API (e.g., `from protego import Protego`).
Install the library using pip: `pip install protego`
Ensure that the `robotstxt_body` passed to `Protego.parse()` is decoded into a string (e.g., UTF-8) before parsing. Example: `Protego.parse(response.text)` if using `requests`, or `Protego.parse(robotstxt_bytes.decode('utf-8'))`.Import the `Protego` class and call `parse()` as a static method on the class: `from protego import Protego` then `robots = Protego.parse(robots_txt_content)`.
No dependency data recorded yet.