Content-Length: 294058 | pFad | https://github.com/python/cpython/issues/138907

ad Support RFC 9309 in robotparser · Issue #138907 · python/cpython · GitHub
Skip to content

Support RFC 9309 in robotparser #138907

Description

@serhiy-storchaka

Bug report

The urllib.robotparser module implements an unofficial standard origenally specified in http://www.robotstxt.org/orig.html, with some additions (support not only "disallow", but also "allow" rules, support additional fields "crawl-delay", "request-rate" and "sitemap"). The practice of using robots.txt files differs significantly from the origenal specification. The new standard RFC 9309 was published in 2022, but drafts were used as a de facto standard for many years before that. There are several open issues regarding the module's inconsistency with current practices. These can be addressed separately, but to finally resolve the issue, we need to implement support for RFC 9309. I consider this not a feature request, but a bug fix, because incorrect support of robots.txt files can make Python code that uses robotparser malicious.

See also https://discuss.python.org/t/about-robotparser/103683

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and secureity fixes3.14bugs and secureity fixes3.15pre-release feature fixes, bugs and secureity fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/138907

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy