Library of web-related functions for HTML manipulation, HTTP processing, URL handling, and encoding detection
84
{
"context": "This criteria evaluates how effectively the engineer uses w3lib's HTML entity handling functions to solve the problem. The focus is on proper usage of replace_entities() and has_entities() functions with their various parameters.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses replace_entities",
"description": "The convert_entities() function uses w3lib.html.replace_entities() to convert HTML entities to Unicode characters",
"max_score": 30
},
{
"name": "Uses keep parameter",
"description": "The convert_entities() function correctly passes the keep parameter to replace_entities() to preserve specific entities",
"max_score": 20
},
{
"name": "Uses remove_illegal parameter",
"description": "The convert_entities() function correctly passes the remove_illegal parameter to replace_entities() to handle illegal character references",
"max_score": 15
},
{
"name": "Uses has_entities",
"description": "The has_entities() function uses w3lib.html.has_entities() to check for the presence of HTML entities in text",
"max_score": 25
},
{
"name": "Handles text encoding",
"description": "Correctly handles the encoding parameter if needed when calling w3lib functions (or uses default behavior appropriately)",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-w3libevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10