WhakerPy 2.4

https://github.com/brigitte-bigi/WhakerPy/

Module whakerpy.httpd

Class BlackListAgent

Description

Manager of a list of user agents to be rejected.

An entry is a plain string token, for example 'SemrushBot'. The rule is the one of the base class, a substring search, because the name of an agent is written inside a longer header value.

Constructor

__init__

Create an empty blacklist.

View Source
def __init__(self) -> None:
    """Create an empty blacklist."""
    self._blacklist = set()