INNER CODE UNIT · Python

_remove_blacklisted_elements_and_attributes

handrew/browserpilot · browserpilot/agents/gpt_selenium_agent.py:183

    def _remove_blacklisted_elements_and_attributes(self) -> BeautifulSoup:
        """Clean HTML to remove blacklisted elements and attributes. Returns
        BeautifulSoup object."""
        blacklisted_elements = set(
            [
                "head",
                "title",
                "meta",
                "script",
                "style",
                "path",
                "svg",
                "br",
                "::marker",
            ]
        )
        blacklisted_attributes = set(
            ["style", "ping", "src", "item*", "aria*", "js*", "data-*"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…