Skip to content

Instantly share code, notes, and snippets.

@mike-pete
Created May 16, 2022 00:13
Show Gist options
  • Save mike-pete/28c0ca91c79b2c74f6574d5fc294b7c5 to your computer and use it in GitHub Desktop.
Save mike-pete/28c0ca91c79b2c74f6574d5fc294b7c5 to your computer and use it in GitHub Desktop.
get a list of all reddit users that commented on a post
let commenters = document.querySelectorAll('[data-testid="comment_author_link"]')
let commenterData = {}
commenters.forEach(commenter => commenterData[commenter.text] = commenter.href)
console.log(commenterData)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment