Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140734

Easiest way to scrape out child elements of a parent div

$
0
0

Learning to build a small Chrome scraper extension, which will scrape a LinkedIn search page and return certain information. If I go into the console and use a forEach loop as such, document.querySelectorAll('span.name.actor-name').forEach(e => console.log(e.innerHTML)), I'll get the top 5 names printed to the console. However, I am looking to also print out the occupation and location of the individual, next to their name. I thought I could start with querying the parent div of each result:

enter image description here

However, that hasn't worked and I'm not sure where to begin... So any help to get the additional info out alongside each name would be very helpful.


Viewing all articles
Browse latest Browse all 140734

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>