This Gist was automatically created by Carbide, a free online programming environment.
Created
April 7, 2021 03:22
-
-
Save carbide-public/63b4108f9a35c4846c88f443cfeb10b1 to your computer and use it in GitHub Desktop.
untitled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tabletojson = require('tabletojson').Tabletojson; | |
var html = `<table class="wikitable mw-collapsible mw-made-collapsible" style="width:100%; font-size:88%;"> | |
<tbody> | |
<tr valign="top" style=""> | |
<th>Minor version | |
</th> | |
<th><a href="/wiki/WebKit" title="WebKit">WebKit</a> Version | |
</th> | |
<th>Operating System | |
</th> | |
<th>Release Date | |
</th> | |
<th>Features | |
</th></tr> | |
<tr style=""> | |
<td style="white-space:nowrap; background:#ececec;">14.0 | |
</td> | |
<td rowspan="2">610.2.11<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2020)">citation needed</span></a></i>]</sup> | |
</td> | |
<td rowspan="8"><a href="/wiki/MacOS_Mojave" title="MacOS Mojave">macOS 10.14</a>-<a href="/wiki/MacOS_Big_Sur" title="MacOS Big Sur">11</a> | |
</td> | |
<td>September 16, 2020 | |
</td> | |
<td>Bundled with macOS Big Sur 11.0.<sup id="cite_ref-92" class="reference"><a href="#cite_note-92">[92]</a></sup> Ends support for macOS 10.13 High Sierra. First released as a standalone update for macOS Mojave and Catalina on September 16, 2020. | |
<ul><li>Adds support for Safari Web Extensions, an extensions API compatible with other browsers like <a href="/wiki/Firefox" title="Firefox">Firefox</a> and <a href="/wiki/Google_Chrome" title="Google Chrome">Google Chrome</a></li> | |
<li>Adds in-line webpage translation (Available for macOS Big Sur only)<sup id="cite_ref-93" class="reference"><a href="#cite_note-93">[93]</a></sup></li> | |
<li>Removes Flash support</li> | |
<li>Adds a Privacy Report to show what Intelligent Tracking Protection has blocked</li> | |
<li>Enables full third-party cookie blocking</li> | |
<li>Adds support for Face ID and Touch ID authentication</li> | |
<li>Notifies users if a password in the iCloud Keychain was in a data breach</li> | |
<li>Performance improvements</li> | |
<li>General improvements and fixes</li> | |
<li>Security fixes <sup id="cite_ref-94" class="reference"><a href="#cite_note-94">[94]</a></sup></li></ul> | |
</td></tr> | |
<tr style=""> | |
<td style="white-space:nowrap; background:#ececec;">14.0.1 | |
</td> | |
<td>November 12, 2020 | |
</td> | |
<td>Security update.<sup id="cite_ref-95" class="reference"><a href="#cite_note-95">[95]</a></sup> | |
</td></tr> | |
<tr style=""> | |
<td style="white-space:nowrap; background:#ececec;">14.0.2 | |
</td> | |
<td>610.3.7.1.9 | |
</td> | |
<td>December 14, 2020 | |
</td> | |
<td>Security update.<sup id="cite_ref-HT212007_96-0" class="reference"><a href="#cite_note-HT212007-96">[96]</a></sup> | |
</td></tr> | |
<tr style=""> | |
<td style="white-space:nowrap; background:#d4f4b4;" rowspan="2">14.0.3 | |
</td> | |
<td>610.4.3.1.4 | |
</td> | |
<td>February 1, 2021 | |
</td> | |
<td>Security update.<sup id="cite_ref-HT212152_12-1" class="reference"><a href="#cite_note-HT212152-12">[12]</a></sup> | |
</td></tr> | |
<tr style=""> | |
<td>610.4.3.1.7 | |
</td> | |
<td>March 8, 2021 | |
</td> | |
<td>Security update. | |
</td></tr></tbody></table>` | |
var cheerio = require('cheerio'), | |
cheerioTableparser = require('cheerio-tableparser'); | |
$ = cheerio.load(html); | |
cheerioTableparser($); | |
var data = $("table").parsetable(true, true, true); | |
console.log(data) | |
// const converted = tabletojson.convert(html); | |
// console.log(converted); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment