Skip to content

Commit

Permalink
Merge pull request #452 from adrieljss/master
Browse files Browse the repository at this point in the history
  • Loading branch information
jmerle authored May 15, 2024
2 parents f7118bd + 86fb939 commit fff89e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsers/problem/TLXProblemParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class TLXProblemParser extends Parser {
const elem = htmlToElement(html);
const task = new TaskBuilder('TLX').setUrl(url);

const name = [...elem.querySelector('.chapter-problem-page__title h3').childNodes]
const name = [...elem.querySelector('h2.programming-problem-statement__name').childNodes]
.filter(node => node.nodeType === Node.TEXT_NODE)
.map(node => node.textContent)
.join('')
Expand All @@ -81,7 +81,7 @@ export class TLXProblemParser extends Parser {
task.setName(breadcrumbText[breadcrumbText.length - 1] + '. ' + task.name);
}

const limitNodes = elem.querySelector('.statement-header__limits');
const limitNodes = elem.querySelector('.programming-problem-statement__limits');

const [, timeLimit, timeLimitUnit] = /([0-9.]+) ?(s|ms)/.exec(limitNodes.textContent);
task.setTimeLimit(timeLimitUnit === 's' ? parseFloat(timeLimit) * 1000 : parseFloat(timeLimit));
Expand Down

0 comments on commit fff89e5

Please sign in to comment.