Skip to content

Commit 04537b1

Browse files
committed
try using fetch instead?
1 parent 6bba2c4 commit 04537b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usaco_util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ async function addProblem(id: number) {
99
console.log('Adding problem ', id);
1010
try {
1111
const url = `https://usaco.org/index.php?page=viewproblem2&cpid=${id}`;
12-
const response = await axios.get(url);
13-
const htmlContent: string = response.data;
12+
const response = await (await fetch(url)).text();
13+
const htmlContent: string = response;
1414
const problem = htmlContent.match(/<h2> Problem (\d). (.*) <\/h2>/)!;
1515
const number = problem[1],
1616
title = problem[2];

0 commit comments

Comments
 (0)