How to import a COVID-19 data table from a website into a Mathematica notebook

( Not an answer, extended comment.)

In this particular case (the code of that site today):

lsData = Import["https://www.worldometers.info/coronavirus", "Data"]

works. Meaning, the data can be investigated further using Cases, Part, and TableForm (or other tabular formatting function.)

enter image description here

For example, this list

lsTbls = Cases[
   lsData, {{"#", "Country, Other", "Total Cases", "New Cases", 
     "Total Deaths", ___}, ___}, \[Infinity]];
Length[lsTbls]

(* 3 *)

has three elements that (seem to) correspond to "Now", "Yesterday", "2 days ago" shown in the site.

Note, the data has a continent column, but the import above did not align the rows/columns properly. Meaning, further data massaging / wrangling is needed.


Read the data not with "HTML" but with "Data":

dat = Import["https://www.worldometers.info/coronavirus/", "Data"];

Now you have all data in one big mess and you need to pick it apart.

E.g.:

TableForm[tt[[2, 2, 2, 1, 2]], TableHeadings -> {None, tt[[2, 2, 2, 1, 1]]}]

Or:

TableForm[tt[[2, 2, 2, 2, 2]], TableHeadings -> {None, tt[[2, 2, 2, 2, 1]]}]

E.t.c.