tessl install tessl/pypi-w3lib@2.3.0Library of web-related functions for HTML manipulation, HTTP processing, URL handling, and encoding detection
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.91x
Baseline
Agent success rate without this tile
92%
{
"context": "This criteria evaluates how effectively the engineer uses the w3lib package's safe_url_string function to sanitize and normalize URLs. The focus is on proper utilization of w3lib's URL safety features rather than implementing custom URL validation or encoding logic.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses safe_url_string",
"description": "Implementation imports and uses the safe_url_string function from w3lib.url module",
"max_score": 40
},
{
"name": "Proper error handling",
"description": "Returns None for invalid inputs (non-strings or malformed URLs) by checking the input type or catching exceptions from safe_url_string",
"max_score": 20
},
{
"name": "Handles special characters",
"description": "Correctly handles URLs with special characters in the path (spaces, non-ASCII) by allowing safe_url_string to perform encoding",
"max_score": 15
},
{
"name": "Supports IDNA",
"description": "Correctly handles internationalized domain names by relying on safe_url_string's built-in IDNA support",
"max_score": 15
},
{
"name": "Handles encoding normalization",
"description": "Correctly handles mixed or incorrect encoding in URL components by using safe_url_string's normalization capabilities",
"max_score": 10
}
]
}