Created
May 23, 2020 21:48
-
-
Save lordgraysith/a6726b8d167bb32fbfc9d2d026516f43 to your computer and use it in GitHub Desktop.
Extracts member info from the member list page in LCR
This file contains 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
const rawMembers = $('.member-list tr.ng-scope').splice(0) | |
const members = rawMembers.reduce((acc, mem) => { | |
return acc.concat([{ | |
name: $(mem).find('td.fn span')[0].textContent, | |
sex: $(mem).find('td.sex')[0].textContent, | |
age: parseInt($(mem).find('td.age')[0].textContent), | |
phone: $(mem).find('td.phone span a')[0].textContent | |
}]) | |
}, []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment