I'm trying to come up with a script that takes the selected URL and pastes a list of all headings (h2, h3 etc.) in the page.
This is easily done in Google Sheets, by using the following formula:
Code: Select all
=IMPORTXML("https://www.example.com/list-article","//h2")
I've tried searching for it, but there are endless discussions about extracting text from web pages with no mention on specific tags.
Thanks in advance for the help!