Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions gpt_oss/tools/simple_browser/page_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ def replace_node_with_text(node: lxml.html.HtmlElement, text: str) -> None:

def replace_images(
root: lxml.html.HtmlElement,
base_url: str,
session: aiohttp.ClientSession | None,
) -> None:
"""Finds all image tags and replaces them with numbered placeholders (includes alt/title if available)."""
cnt = 0
Expand Down Expand Up @@ -274,11 +272,7 @@ def process_html(
final_title = ""

urls = _clean_links(root, url)
replace_images(
root=root,
base_url=url,
session=session,
)
replace_images(root=root)
_remove_math(root)
clean_html = lxml.etree.tostring(root, encoding="UTF-8").decode()
text = html_to_text(clean_html)
Expand Down