Skip to content

Commit

Permalink
Fix selector that gets all solutions items
Browse files Browse the repository at this point in the history
  • Loading branch information
nibble-4bits committed May 23, 2021
1 parent 5b101ee commit 357d03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function main() {
// Now we get all solutions for each kata we have solved
log.info('Scraping solutions.');
const solutions = await page.evaluate(() => {
return [...document.querySelectorAll('.list-item.solutions')].map(solution => {
return [...document.querySelectorAll('.list-item-solutions')].map(solution => {
const problemId = solution.querySelector('.item-title a').getAttribute('href').match(/[a-z0-9]+$/g)[0];
const problemName = solution.querySelector('.item-title a').textContent.toLowerCase().replace(/[^\w ]/gi, '').trim().replace(/ +/g, '_');
const languages = [...solution.querySelectorAll('code')].map(code => code.getAttribute('data-language'));
Expand Down

0 comments on commit 357d03c

Please sign in to comment.