Skip to content

Instantly share code, notes, and snippets.

@BeFiveINFO
Created December 24, 2015 09:20
Show Gist options
  • Save BeFiveINFO/4b54eb02e7533edf5036 to your computer and use it in GitHub Desktop.
Save BeFiveINFO/4b54eb02e7533edf5036 to your computer and use it in GitHub Desktop.
Table text content scraper idea
/*
copy and paste into the console of browser
*/
var _listArray = [];
jQuery('tbody tr[role=row]').each(function (i) {
var $_current = $(this);
var _name = $_current.find(':nth-child(1) a').text();
var _email = $_current.find(':nth-child(2) a').text();
_listArray.push({
name: _name,
email: _email
});
});
console.log(_listArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment