easydomscrapper

An extremely simple module to web scrapper a DOM element(s)

Usage no npm install needed!

<script type="module">
  import easydomscrapper from 'https://cdn.skypack.dev/easydomscrapper';
</script>

README

easydomscrapper

An extremely simple module to web scrapper a DOM element(s)

const eds = require('./nodemodules/easydomscrapper/eds').eds;
//console.dir(typeof eds())
//console.log('1', url, selector, attr);

const url = 'https://thepiratebay.org/top/201';
const selector = 'a:nth-child(2)';
const attr = `href`;

console.log('2', url, selector, attr);

(async () => await eds(url, selector, attr))()

   // **************************************
   //await page.waitForSelector('a:nth-child(2)');
   //await page.waitFor(1000);
   //await eds.getContent(page, 'a:nth-child(2)', attr)