Skip to main content
100%

PKMNCards to CSV

✓ Published0🌍 Public
KKevinGutowski
Last edited Oct 11, 2022
Created on Oct 11, 2022

This example converts the content of a PKMN Cards webpage into a CSV file. It extracts the table headings and row text from the page’s article elements, then joins them into a comma-separated string. The script uses the DOM API to query elements such as `getElementsByClassName` and `getElementsByTagName`, and triggers a download via a generated anchor element with a `data:text/csv` URI. The output filename is taken from the search-form input value, creating a CSV matching the user’s search query.

AI-generated description

Similar vizzes