Problem Description
The current scrape-to-Markdown conversion appears to drop semantic information when a page represents data using icons or images instead of text nodes.
A concrete example is:
https://dota2protracker.com/hero/Ember%20Spirit
When scraping the page, sections such as:
Most common Inventories in lategame
Minute 20-35
Minute 35-55
Minute 55+
Neutral Items
Tier 1
20.7% 51.1% wr
12.9% 52.1% wr
11.0% 51.2% wr
...
retain the percentages, but the corresponding item names are lost because they are represented by icons/images in the page.
src/scrape/markdown.ts::renderNode() currently handles text nodes, headings, lists, tables, etc., but there does not appear to be handling for semantic image attributes such as alt, title, or aria-label.
Motivation
Many websites use icons instead of texts in tables, dashboards, build lists, statistics pages, etc. Dropping those labels can also drop semantic meanings surrounding the numeric/text content.
Expected Behavior
I think scrape should preserve meaningful metadata associated with images/icons when available.
For example, <img src="..." alt="Octarine Core"> could produce something like Octarine Core or .
The exact output format is flexible but the important part is that semantic labels of images are not silently discarded.
Problem Description
The current scrape-to-Markdown conversion appears to drop semantic information when a page represents data using icons or images instead of text nodes.
A concrete example is:
https://dota2protracker.com/hero/Ember%20Spirit
When scraping the page, sections such as:
retain the percentages, but the corresponding item names are lost because they are represented by icons/images in the page.
src/scrape/markdown.ts::renderNode()currently handles text nodes, headings, lists, tables, etc., but there does not appear to be handling for semantic image attributes such as alt, title, or aria-label.Motivation
Many websites use icons instead of texts in tables, dashboards, build lists, statistics pages, etc. Dropping those labels can also drop semantic meanings surrounding the numeric/text content.
Expected Behavior
I think scrape should preserve meaningful metadata associated with images/icons when available.
For example,
<img src="..." alt="Octarine Core">could produce something likeOctarine Coreor.The exact output format is flexible but the important part is that semantic labels of images are not silently discarded.