Last active
May 13, 2021 12:13
-
-
Save u-l-y/c769624293c814ae0aafab24134ff8bb to your computer and use it in GitHub Desktop.
Extract Emails from Gmail current page using the browser console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure you load the url that you are looking to get the emails from | |
// right from the beginning, so if you are looking to search something, do | |
// the search and then refresh to load just the data of the right url | |
// Example: https://mail.google.com/mail/u/0/#search/job+position | |
console.log([...document.querySelectorAll('span')] | |
.filter((el, idx) => el.getAttribute('email') && idx % 2 === 1) | |
.map(el => el.getAttribute('email'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment