Adding clarification about performance and code comment

This commit is contained in:
Massimo Gismondi 2025-01-17 21:42:08 +01:00
parent 189e75bbfd
commit b455af66e7
2 changed files with 5 additions and 2 deletions

View file

@ -133,7 +133,9 @@ def json_to_table(robots_json):
def json_to_htaccess(robot_json):
htaccess = "RewriteEngine On\n"
# Creates a .htaccess filter file. It uses a regular expression to filter out
#User agents that contain any of the blocked values.
htaccess += "RewriteEngine On\n"
htaccess += "RewriteCond %{HTTP_USER_AGENT} ^.*("
robots = map(lambda el: el.replace(" ", "\\ "), robot_json.keys())