ChatGPT gave a nice starting point: // Get all tweet elements on the page const tweets = document.querySelectorAll('.tweet') // Iterate over each tweet tweets.forEach((tweet) { // Get the tweet text const tweetText = tweet.querySelector('.tweet-text').innerText