Skip to content

Commit 70afed7

Browse files
committed
uuh… this may or may not work we'll find out (spoiler: it didn't)
1 parent 3fd5ac4 commit 70afed7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

setup.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const fs = require("fs");
22
const path = require("path");
33
// eslint-disable-next-line
4-
const fetch = require("node-fetch");
54

65
let soln_day = process.argv[3];
76

@@ -56,7 +55,7 @@ const interval = setInterval(() => {
5655

5756
setTimeout(async () => {
5857
console.log("\nWait over! Fetching…");
59-
const input_text = await (await fetch("https://adventofcode.com/"+year+"/day/"+soln_day+"/input", {
58+
const input_text = await (await (await import("node-fetch").default)("https://adventofcode.com/"+year+"/day/"+soln_day+"/input", {
6059
headers: {"Cookie": cookietext},
6160
})).text();
6261
fs.writeFileSync(txtfile_path, input_text, "utf-8");

0 commit comments

Comments
 (0)