|
@@ -23,6 +23,10 @@ export async function parseContest(contestId: string) {
|
|
|
vscode.window.showInformationMessage(`Downloading contest ${contestId}...`);
|
|
|
|
|
|
let soup = new JSSoup(response.body);
|
|
|
+
|
|
|
+ let name: string = soup.find("div", {"id" : "sidebar"}).find("a").text;
|
|
|
+ name = name.toLowerCase().replace(' ', '-');
|
|
|
+
|
|
|
let problemsTable = soup.find("table", "problems");
|
|
|
let problems: Problem[] = [];
|
|
|
let problemSection = problemsTable.findAll("td", "id");
|
|
@@ -37,9 +41,6 @@ export async function parseContest(contestId: string) {
|
|
|
problems.push(prob);
|
|
|
}
|
|
|
|
|
|
- let name: string = soup.find("div", "sidebar").find("a").text;
|
|
|
- name = name.toLowerCase().replace(' ', '-');
|
|
|
-
|
|
|
return new Contest(name, problems);
|
|
|
}
|
|
|
|