How to get the content of a div tag when scraping with puppeteer and NodeJs

I heard of this library called puppeteer and is usefulness in scraping web pages. so i decided to scrape a gaming site content so I can store it data and go through it later.

But after i copied the XPATH of the div tag I want puppeteer to scrape it content, its returning Empty string Please what am I doing wrong.

This is the url am trying to scrape here

i want to scrape the div tag where the result of the 6 different color ball are being displayed.
so i can get the number of those colors every 45 seconds.

const puppeteer = require("puppeteer");

async function scrapeData(url){
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url);

const [dataReceived] = await page.$x('/html/body/div[1]/div/div/div/footer/div[2]/div[1]/div/div[1]/div[2]/div/div');
const elContent = await dataReceived.getProperty('textContent');
const elValue = await elContent.jsonValue();
console.log("just testing");

here is the image of the returned empty string in vscode terminal

enter image description here

79 thoughts on “How to get the content of a div tag when scraping with puppeteer and NodeJs”

  1. Pingback: sildenafil
  2. Pingback: viagra pill
  3. Pingback: viagra sale
  4. Pingback: otc viagra
  5. Pingback: cialis shop
  6. Pingback: how to buy cialis
  7. Pingback: viagra online
  8. Pingback: sildenafil online
  9. Pingback: overnight cialis
  10. Pingback: viagra for sale
  11. Pingback: viagra tablets uk
  12. Pingback: reddit cialis
  13. Pingback:
  14. Pingback: sildenafil 100mg
  15. Pingback: what is cialis
  16. Pingback: cost of tadalafil
  17. Pingback: taking viagra
  18. Pingback: generic for viagra
  19. Pingback: viagra substitute
  20. Pingback: snorting viagra
  21. Pingback: viagra tablets
  22. Pingback: viagra cost
  23. Pingback: bestellen viagra
  24. Pingback: levitra vs viagra
  25. Pingback: buying viagra
  26. Pingback: viagra or cialis
  27. Pingback: viagra for women
  28. Pingback: walmart viagra
  29. Pingback: viagra alternative
  30. Watch the best live coverage of your favourite sports: Football, Golf, Rugby, Cricket, F1, Boxing, NFL, NBA, plus the latest real madrid sports news,
    Breaking news & live sports coverage including results, video, audio and analysis on Football, F1, Cricket, Rugby Union, Rugby League, Golf, Tennis and all …

  31. Pingback: hims viagra