Advertisement
guitarplayer616

JS grab leetcodes

Jun 8th, 2022
796
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. const nodes = selector => [...document.querySelectorAll(selector)];
  2. const name_url_difficulty = nodes("tr.ng-star-inserted").map(x => [x.childNodes[1].textContent, x.childNodes[2].children[0].textContent, x.childNodes[1].children[0].href])
  3. console.log(JSON.stringify(name_url_difficulty))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement