Sanitizes and cleans HTML content by removing unwanted elements, attributes, and whitespace.
Provides fine-grained control over each cleaning operation through configurable options.
from typing import TypedDictfrom playwright.async_api import Pagefrom intuned_browser import sanitize_htmlclass Params(TypedDict): passasync def automation(page: Page, params: Params, **_kwargs): await page.goto("https://books.toscrape.com") first_row = page.locator("ol.row").locator("li").first # Get the HTML of the first row. html = await first_row.inner_html() # Sanitize the HTML. sanitized_html = sanitize_html(html) # Log the sanitized HTML. print(sanitized_html) # Return the sanitized HTML. return sanitized_html
Arguments
str
required
The HTML content to sanitize
bool
Remove all <script> elements. Defaults to True.
bool
Remove all <style> elements. Defaults to True.
bool
Remove all <svg> elements. Defaults to True.
bool
Remove HTML comments. Defaults to True.
bool
Remove attributes longer than max_attribute_length. Defaults to True.
int
Maximum length for attributes before removal. Defaults to 500.
list[str]
List of attribute names to always preserve. Defaults to [“class”, “src”].
bool
Remove empty tags (except preserved ones). Defaults to True.
list[str]
List of tag names to preserve even when empty. Defaults to [“img”].
bool
Remove extra whitespace between tags and empty lines. Defaults to True.
Returns: str
The sanitized HTML string
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Intuned","colors":{"primary":"#f4672f","light":"#f57847","dark":"#e86430"},"logo":{"light":"https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/logo/light.svg?fit=max\u0026auto=format\u0026n=afjZxAQhak8dZFgC\u0026q=85\u0026s=8c29600bacd9dae40a8e850d36c7d2cc","dark":"https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/logo/dark.svg?fit=max\u0026auto=format\u0026n=afjZxAQhak8dZFgC\u0026q=85\u0026s=08ffc206f0d939f6e2db3904b0f0134b"},"favicon":"https://mintcdn.com/intuned-dev/D6lboD5NsphRQ1iL/favicon.svg?fit=max\u0026auto=format\u0026n=D6lboD5NsphRQ1iL\u0026q=85\u0026s=06269f8e6ec0bbb9ae63fcd6032d41d2","api":{"openapi":["_resources/openapi/generated/all_generated.yaml"]},"background":{"color":{"light":"#fafafa","dark":"#22252a"}},"navbar":{"links":[{"href":"https://intunedhq.com/docs/main/06-resources/help-and-support","label":"Need help?"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.intuned.io"}},"footer":{"socials":{"website":"https://intunedhq.com/","github":"https://github.com","twitter":"https://twitter.com/intunedhq","linkedin":"https://www.linkedin.com/company/intunedhq","discord":"https://discord.gg/cRAtnKH4jf"}},"integrations":{"koala":{"publicApiKey":"pk_956f5458cba963529649a33418512ff1e594"},"posthog":{"apiKey":"phc_C0j5PCIsnnLrj2pbDpjYrxD9yO2CBdZQoxvI9AWgQfZ","apiHost":"https://app.intuned.io/pohi"}},"contextual":{"options":["copy","chatgpt","claude","vscode","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"intuned-dev","hasAudioNarration":false,"actualSubdomain":"intuned-dev","customDomains":["intunedhq.com"],"gitSource":{"type":"github","owner":"intuned","repo":"webapp","deployBranch":"master","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afc866c98d6417bab71bd05","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"Documentation","count":111},{"language":"default","tag":"Browser SDKs","count":61},{"language":"default","tag":"References","count":38},{"language":"default","tag":"Typescript SDK","count":34},{"language":"default","tag":"Client APIs","count":30},{"language":"default","tag":"Python SDK","count":26},{"language":"default","tag":"Type References","count":22},{"language":"default","tag":"Learn","count":19},{"language":"default","tag":"Platform features","count":17},{"language":"default","tag":"Quick recipes","count":15}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@intunedhq.com","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"a:has(code){border-bottom:0px!important}a code:hover{border-bottom:1px solid rgb(var(--primary-light))!important}#sidebar li div{overflow:hidden;text-overflow:ellipsis}:root{--gray-400: 204 204 204}.dark .accordion-group{border-color:rgba(20, 22, 26, 0.7)!important;background-color:#1d1f24!important}.dark .accordion{border-color:rgba(20, 22, 26, 0.7)!important;background-color:#1d1f24!important}.dark .card{background-color:#1d1f24!important;color:#fff!important}.dark .code{background-color:#1d1f24!important;color:#fff!important}.dark [data-component-part=\"code-block-root\"]{background-color:#111215!important}"}]}
{"page":{"pagePath":"automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html","slug":"/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html","pageMetadata":{"title":"sanitize_html","description":null,"href":"/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Sanitizes and cleans HTML content by removing unwanted elements, attributes, and whitespace.\nProvides fine-grained control over each cleaning operation through configurable options.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sanitize_html`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` html`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_scripts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_styles`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_svgs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_comments`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_long_attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` max_attribute_length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` preserve_attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: list[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` remove_empty_tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` preserve_empty_tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: list[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` minify_whitespace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Basic Sanitization`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typing `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TypedDict`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` playwright.async_api `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Page`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` intuned_browser `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sanitize_html`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`TypedDict`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` pass`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` automation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Page, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Params, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_kwargs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` page.goto(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://books.toscrape.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` first_row `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` page.locator(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ol.row\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).locator(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"li\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).first`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Get the HTML of the first row.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` html `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` first_row.inner_html()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Sanitize the HTML.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sanitized_html `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sanitize_html(html)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Log the sanitized HTML.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(sanitized_html)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Return the sanitized HTML.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sanitized_html`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`arguments`,children:`Arguments`}),`\n`,_jsx(ResponseField,{name:`html`,type:`str`,required:true,id:`param-html`,children:_jsx(_components.p,{children:`The HTML content to sanitize`})}),`\n`,_jsx(ResponseField,{name:`remove_scripts`,type:`bool`,id:`param-remove-scripts`,children:_jsxs(_components.p,{children:[`Remove all `,_jsx(_components.code,{children:`\u003cscript>`}),` elements. Defaults to True.`]})}),`\n`,_jsx(ResponseField,{name:`remove_styles`,type:`bool`,id:`param-remove-styles`,children:_jsxs(_components.p,{children:[`Remove all `,_jsx(_components.code,{children:`\u003cstyle>`}),` elements. Defaults to True.`]})}),`\n`,_jsx(ResponseField,{name:`remove_svgs`,type:`bool`,id:`param-remove-svgs`,children:_jsxs(_components.p,{children:[`Remove all `,_jsx(_components.code,{children:`\u003csvg>`}),` elements. Defaults to True.`]})}),`\n`,_jsx(ResponseField,{name:`remove_comments`,type:`bool`,id:`param-remove-comments`,children:_jsx(_components.p,{children:`Remove HTML comments. Defaults to True.`})}),`\n`,_jsx(ResponseField,{name:`remove_long_attributes`,type:`bool`,id:`param-remove-long-attributes`,children:_jsx(_components.p,{children:`Remove attributes longer than max_attribute_length. Defaults to True.`})}),`\n`,_jsx(ResponseField,{name:`max_attribute_length`,type:`int`,id:`param-max-attribute-length`,children:_jsx(_components.p,{children:`Maximum length for attributes before removal. Defaults to 500.`})}),`\n`,_jsx(ResponseField,{name:`preserve_attributes`,type:`list[str]`,id:`param-preserve-attributes`,children:_jsx(_components.p,{children:`List of attribute names to always preserve. Defaults to [“class”, “src”].`})}),`\n`,_jsx(ResponseField,{name:`remove_empty_tags`,type:`bool`,id:`param-remove-empty-tags`,children:_jsx(_components.p,{children:`Remove empty tags (except preserved ones). Defaults to True.`})}),`\n`,_jsx(ResponseField,{name:`preserve_empty_tags`,type:`list[str]`,id:`param-preserve-empty-tags`,children:_jsx(_components.p,{children:`List of tag names to preserve even when empty. Defaults to [“img”].`})}),`\n`,_jsx(ResponseField,{name:`minify_whitespace`,type:`bool`,id:`param-minify-whitespace`,children:_jsx(_components.p,{children:`Remove extra whitespace between tags and empty lines. Defaults to True.`})}),`\n`,_jsxs(Heading,{level:`2`,id:`returns-str`,children:[`Returns: `,_jsx(_components.code,{children:`str`})]}),`\n`,_jsx(_components.p,{children:`The sanitized HTML string`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"sanitize_html","description":null,"href":"/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Arguments","slug":"arguments","depth":2,"children":[]},{"title":"Returns: str","slug":"returns-str","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/intuned-dev/330f1f878769cd36/rb2b.js"],"subdomain":"intuned-dev","siteName":"Intuned","title":"sanitize_html - Intuned","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T15:31:15.119Z","originalFileLocation":"automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Intuned\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"sanitize_html - Intuned\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Intuned\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://intuned-dev.mintlify.site/docs/_mintlify/api/og/v2?division=Python+SDK\u0026amp;title=sanitize_html\u0026amp;theme=0481e9f80136a4886c4612f0\u0026amp;signature=30ae779737597789579b38b1cc3e6856a9bcab4d8706e9cb150f6e8d28947103\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"sanitize_html - Intuned\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://intuned-dev.mintlify.site/docs/_mintlify/api/og/v2?division=Python+SDK\u0026amp;title=sanitize_html\u0026amp;theme=0481e9f80136a4886c4612f0\u0026amp;signature=30ae779737597789579b38b1cc3e6856a9bcab4d8706e9cb150f6e8d28947103\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/intuned-dev/c1oeYU5knDlFGNKO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Intuned\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#f4672f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://intunedhq.com/#organization\",\"name\":\"Intuned\",\"url\":\"https://intunedhq.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/logo/light.svg?fit=max\u0026auto=format\u0026n=afjZxAQhak8dZFgC\u0026q=85\u0026s=8c29600bacd9dae40a8e850d36c7d2cc\"}},{\"@type\":\"WebSite\",\"@id\":\"https://intunedhq.com/docs#website\",\"name\":\"Intuned\",\"url\":\"https://intunedhq.com/docs\",\"publisher\":{\"@id\":\"https://intunedhq.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html#webpage\",\"url\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html\",\"name\":\"sanitize_html\",\"dateModified\":\"2026-11-02T15:31:15.119Z\",\"isPartOf\":{\"@id\":\"https://intunedhq.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Python SDK\",\"item\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"sanitize_html\",\"item\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html#article\",\"headline\":\"sanitize_html\",\"name\":\"sanitize_html\",\"url\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html\",\"mainEntityOfPage\":{\"@id\":\"https://intunedhq.com/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html#webpage\"},\"dateModified\":\"2026-11-02T15:31:15.119Z\",\"publisher\":{\"@id\":\"https://intunedhq.com/#organization\"},\"isPartOf\":{\"@id\":\"https://intunedhq.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Intuned\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Intuned\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html.md","siteName":"Intuned","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/main/00-getting-started/introduction"}]},{"anchor":"Browser SDKs","icon":"code","groups":[{"group":"Introduction","icon":"book","pages":[{"title":"Overview","icon":"book-open","href":"/automation-sdks/overview"}]},{"group":"Typescript SDK","icon":"js","pages":[{"title":"TypeScript SDK","sidebarTitle":"@intuned/browser","icon":"cube","href":"/automation-sdks/intuned-sdk/typescript/overview"},{"title":"extractStructuredData","icon":"wand-magic-sparkles","href":"/automation-sdks/intuned-sdk/typescript/ai/functions/extractStructuredData"},{"title":"isPageLoaded","icon":"wand-magic-sparkles","href":"/automation-sdks/intuned-sdk/typescript/ai/functions/isPageLoaded"},{"title":"extractMarkdown","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/extractMarkdown"},{"title":"sanitizeHtml","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/sanitizeHtml"},{"title":"resolveUrl","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/resolveUrl"},{"title":"downloadFile","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/downloadFile"},{"title":"uploadFileToS3","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/uploadFileToS3"},{"title":"saveFileToS3","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/saveFileToS3"},{"title":"filterEmptyValues","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/filterEmptyValues"},{"title":"goToUrl","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/goToUrl"},{"title":"scrollToLoadContent","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/scrollToLoadContent"},{"title":"clickUntilExhausted","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/clickUntilExhausted"},{"title":"processDate","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/processDate"},{"title":"validateDataUsingSchema","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/validateDataUsingSchema"},{"title":"waitForDomSettled","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/waitForDomSettled"},{"title":"withNetworkSettledWait","href":"/automation-sdks/intuned-sdk/typescript/helpers/functions/withNetworkSettledWait"},{"group":"Type References","pages":[{"title":"Attachment","href":"/automation-sdks/intuned-sdk/typescript/helpers/type-references/Attachment"},{"title":"S3Configs","href":"/automation-sdks/intuned-sdk/typescript/helpers/type-references/S3Configs"},{"title":"AttachmentType","href":"/automation-sdks/intuned-sdk/typescript/helpers/type-references/AttachmentType"},{"title":"FileType","href":"/automation-sdks/intuned-sdk/typescript/helpers/type-references/FileType"},{"title":"Trigger","href":"/automation-sdks/intuned-sdk/typescript/helpers/type-references/Trigger"},{"title":"ImageBufferContentItem","href":"/automation-sdks/intuned-sdk/typescript/ai/type-references/ImageBufferContentItem"},{"title":"ImageUrlContentItem","href":"/automation-sdks/intuned-sdk/typescript/ai/type-references/ImageUrlContentItem"},{"title":"TextContentItem","href":"/automation-sdks/intuned-sdk/typescript/ai/type-references/TextContentItem"},{"title":"ContentItem","href":"/automation-sdks/intuned-sdk/typescript/ai/type-references/ContentItem"}]},{"group":"Optimized extractors (Deprecated)","pages":[{"title":"extractArrayFromPage","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/functions/extractArrayFromPage"},{"title":"extractArrayFromLocator","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/functions/extractArrayFromLocator"},{"title":"extractObjectFromPage","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/functions/extractObjectFromPage"},{"title":"extractObjectFromLocator","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/functions/extractObjectFromLocator"},{"group":"Type References","pages":[{"title":"SimpleArrayItemSchema","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/type-references/SimpleArrayItemSchema"},{"title":"SimpleArrayStringSchema","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/type-references/SimpleArrayStringSchema"},{"title":"SimpleObjectSchema","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/type-references/SimpleObjectSchema"},{"title":"SimpleObjectStringSchema","href":"/automation-sdks/intuned-sdk/typescript/optimized-extractors/type-references/SimpleObjectStringSchema"}]}]}]},{"group":"Python SDK","icon":"python","pages":[{"title":"Python SDK","sidebarTitle":"intuned_browser","icon":"cube","href":"/automation-sdks/intuned-sdk/python/overview"},{"title":"extract_structured_data","icon":"wand-magic-sparkles","href":"/automation-sdks/intuned-sdk/python/ai/functions/extract_structured_data"},{"title":"is_page_loaded","icon":"wand-magic-sparkles","href":"/automation-sdks/intuned-sdk/python/ai/functions/is_page_loaded"},{"title":"extract_markdown","description":null,"href":"/automation-sdks/intuned-sdk/python/helpers/functions/extract_markdown"},{"title":"sanitize_html","href":"/automation-sdks/intuned-sdk/python/helpers/functions/sanitize_html"},{"title":"resolve_url","description":null,"href":"/automation-sdks/intuned-sdk/python/helpers/functions/resolve_url"},{"title":"download_file","href":"/automation-sdks/intuned-sdk/python/helpers/functions/download_file"},{"title":"upload_file_to_s3","href":"/automation-sdks/intuned-sdk/python/helpers/functions/upload_file_to_s3"},{"title":"save_file_to_s3","href":"/automation-sdks/intuned-sdk/python/helpers/functions/save_file_to_s3"},{"title":"filter_empty_values","href":"/automation-sdks/intuned-sdk/python/helpers/functions/filter_empty_values"},{"title":"go_to_url","href":"/automation-sdks/intuned-sdk/python/helpers/functions/go_to_url"},{"title":"scroll_to_load_content","href":"/automation-sdks/intuned-sdk/python/helpers/functions/scroll_to_load_content"},{"title":"click_until_exhausted","href":"/automation-sdks/intuned-sdk/python/helpers/functions/click_until_exhausted"},{"title":"process_date","href":"/automation-sdks/intuned-sdk/python/helpers/functions/process_date"},{"title":"validate_data_using_schema","href":"/automation-sdks/intuned-sdk/python/helpers/functions/validate_data_using_schema"},{"title":"wait_for_dom_settled","href":"/automation-sdks/intuned-sdk/python/helpers/functions/wait_for_dom_settled"},{"title":"wait_for_network_settled","href":"/automation-sdks/intuned-sdk/python/helpers/functions/wait_for_network_settled"},{"group":"Type References","pages":[{"title":"Attachment","href":"/automation-sdks/intuned-sdk/python/helpers/type-references/Attachment"},{"title":"AttachmentType","href":"/automation-sdks/intuned-sdk/python/helpers/type-references/AttachmentType"},{"title":"S3Configs","href":"/automation-sdks/intuned-sdk/python/helpers/type-references/S3Configs"},{"title":"FileType","href":"/automation-sdks/intuned-sdk/python/helpers/type-references/FileType"},{"title":"Trigger","href":"/automation-sdks/intuned-sdk/python/helpers/type-references/Trigger"},{"title":"ImageBufferContentItem","href":"/automation-sdks/intuned-sdk/python/ai/type-references/ImageBufferContentItem"},{"title":"ImageUrlContentItem","href":"/automation-sdks/intuned-sdk/python/ai/type-references/ImageUrlContentItem"},{"title":"TextContentItem","href":"/automation-sdks/intuned-sdk/python/ai/type-references/TextContentItem"},{"title":"ContentItem","href":"/automation-sdks/intuned-sdk/python/ai/type-references/ContentItem"}]}]}]},{"anchor":"Client APIs","icon":"server","pages":[{"title":"Client APIs","href":"/client-apis/overview"}]},{"anchor":"Changelog","icon":"calendar","hidden":true,"pages":[{"title":"Changelog","href":"/changelog/product-updates"}]},{"anchor":"Intuned Agent API (Experimental)","icon":"robot","hidden":true,"pages":[{"title":"Intuned Agent API (Experimental)","href":"/client-apis/api-reference/agent/overview"}]}]},"basePath":"","title":"sanitize_html - Intuned","deploymentId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","buildId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","dynamics":[],"chunks":[]}