Skip to content

Instantly share code, notes, and snippets.

@zengxinhui
Created March 26, 2020 03:11
Show Gist options
  • Save zengxinhui/1df41d385b0713c9a5e5178f469cff63 to your computer and use it in GitHub Desktop.
Save zengxinhui/1df41d385b0713c9a5e5178f469cff63 to your computer and use it in GitHub Desktop.
Extract CPU Mega List data to csv
// run under Chrome console
console.log("Name,CPU Mark,Thread Mark,TDP");
$$('tr.tablesorter-hasChildRow', $$('tbody')[1]).forEach(e => {
if (e.childNodes[6].innerText != "NA")
console.log('"' + e.firstChild.childNodes[1].innerText.trim() + '",',
+ parseInt(e.childNodes[2].innerText.replace(/,/g, '')) + ',',
+ parseInt(e.childNodes[4].innerText.replace(/,/g, '')) + ',',
+ parseInt(e.childNodes[6].innerText) + ',')
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment