-3

In Python it is very simple: pandas.read_html("some URL");

I am wondering what's the best way to do this in Javascript. Is there some existing library that can help with this?

KoSpades
  • 121
  • 1
  • 6
  • Does this answer your question? [Perform curl request in javascript?](https://stackoverflow.com/questions/25515936/perform-curl-request-in-javascript) – caramba Feb 18 '20 at 20:40
  • @caramba Not entirely sure. I guess I am looking for something simpler: scrapes all tables in a link and returns a list of tables. – KoSpades Feb 18 '20 at 20:46

1 Answers1

1

You might want to take a look at DOMParser this will create a document object where you can perform any kind of manipulation as any normal html page.

example:

var doc = DOMParser.parseFromString("<html code here>", "text/html");
var tables = doc.querySelectorAll('table'); // returns NodeList

You should fetch the html string from another part of your program.

Roberto Murguia
  • 357
  • 1
  • 2
  • 13