I can’t see the code of the script that David mentioned because it’s in a binary format, but I think it uses the same approach as the script I recently posted: https://kasyan.ho.com.ua/tips/indesign_script/web/alternative_to_socket.html
Note: it performs exactly the same task in two ways: using 1) the socket object (slow) and 2) a shell script (fast).
I see it as a two steps process:
1) download raw html from a web-page to InDesign file
2) interpret it into something useful: e.g. with a series of find-change GREPs. I guess Ariel’s script finds text in between tags, applies corresponding styles and removes tags.
Also, read/listen to the Kris Coppieters’ post in his blog where he explains how to download things from Web to InDesign: https://rorohiko.blogspot.com/2008/07/lightning-brain-podcast-click-here-to.html
Here I collect examples of InDesign interacting with Web (only those that were tested and worked for me): https://kasyan.ho.com.ua/tips/indesign_script/web/web.html
Of course, there’s no a ‘ready to use’ script for you, but probably such a script can be developed.
— Kas