Created
November 18, 2020 17:25
-
-
Save datduyng/6d12180b16fb485aef9eb9c3cf907867 to your computer and use it in GitHub Desktop.
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
| //http://doors.stanford.edu/~sr/universities.html | |
| let data = []; | |
| for (let item of $("ol").children) { | |
| if ( item instanceof HTMLLIElement) { | |
| let inner = item.innerText; | |
| let email_grp = inner.match(/\(([^)]+)\)/); | |
| if (!email_grp || email_grp.length < 2) continue; | |
| let email = email_grp[1]; | |
| let uname = inner.substr(0, inner.indexOf('(')).trim() | |
| data.push({ | |
| uname: uname, | |
| email: email | |
| }); | |
| } | |
| } | |
| copy(data); | |
| // then paste it to your editor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment