Skip to content

Instantly share code, notes, and snippets.

@PietroJomini
Created February 27, 2020 11:23
Show Gist options
  • Save PietroJomini/374787080f00e0a2ce467e8e09bdec51 to your computer and use it in GitHub Desktop.
Save PietroJomini/374787080f00e0a2ce467e8e09bdec51 to your computer and use it in GitHub Desktop.
ah, yes, πš˜πš—πšŽπš•πš’πš—πšŽπš›
data = await page.evaluate(() => [...document.querySelector('div.content > table.rows > tbody').childNodes].slice(1).map(el => [...el.childNodes].slice(0, -1).map(el => el)).map((el, index) => { return { index, number: el[0].innerText, date: el[1].innerText, title: el[2].firstChild.innerText, classi: el[2].lastChild.innerText.split(' ').slice(1).map(el => el.replace(',', '').replace('Βͺ', '')) }; }));
@StaticallyTypedRice
Copy link

I rate it NaN out of [Object object].

@ariedro
Copy link

ariedro commented Feb 28, 2020

.map(el => el)?

@HoWingYip
Copy link

.map(el => el) does nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment