JSFiddle - React, Tailwind, and code Playground
by mhouser_nowmediagroup
HTML
<div class="infolist">
<ul>
<li class="infoco">Kletter & Levine</li>
<li><strong>SIC Code:</strong> 802101 - Dentists</li>
<li><strong>SIC Category:</strong> <a href="http://www.siclists.com/directory/health-services.html">Health services</a></li>
<div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"> </div>
<div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
<li><strong>Country :</strong> <span itemprop="addressCountry">United States</span></li>
<li><strong>City:</strong> <a href="http://www.siclists.com/new-york/saratoga-springs/"><span itemprop="addressLocality">Saratoga Springs</span></a></li>
<li><strong>State:</strong> <a href="http://www.siclists.com/new-york/"><span itemprop="addressRegion">New York</span></a> - NY</li>
<li><strong>Address:</strong> <span itemprop="streetAddress">PO Box 337</span></li>
<li><strong>Zipcode:</strong> <span itemprop="postalCode">12866-0337 (12866)</span></li>
</div>
<li><strong>Tel:</strong> <span itemprop="telephone">5185848150, (518)584-8150</span></li>
<li><strong>Website :</strong> www.kletterlevineherbs.com</li>
</ul>
</div>
JavaScript
javascript: (function(){var t={},e=!0;if("object"==typeof this.artoo&&(artoo.settings.reload||(artoo.log.verbose("artoo already exists within this page. No need to inject him again."),artoo.loadSettings(t),artoo.exec(),e=!1)),e){var o=document.getElementsByTagName("body")[0];o||(o=document.createElement("body"),document.documentElement.appendChild(o));var a=document.createElement("script");console.log("artoo.js is loading..."),a.src="//medialab.github.io/artoo/public/dist/artoo-latest.min.js",a.type="text/javascript",a.id="artoo_injected_script",a.setAttribute("settings",JSON.stringify(t)),o.appendChild(a)}}).call(this);
window.addEventListener('load', function(){
function objMaker(scrape_string) {
return {
data: {entry: { sel: 'li:not(".infoco") strong'}, value: { sel: 'li:not(".infoco") span' } },
}
}
const scrape_string = '.infolist > ul > li'
var niceList = artoo.scrape(scrape_string, objMaker(scrape_string), /*artoo.savePrettyJson*/)
console.log(niceList)
})