We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fd5ac4 commit 70afed7Copy full SHA for 70afed7
setup.js
@@ -1,7 +1,6 @@
1
const fs = require("fs");
2
const path = require("path");
3
// eslint-disable-next-line
4
-const fetch = require("node-fetch");
5
6
let soln_day = process.argv[3];
7
@@ -56,7 +55,7 @@ const interval = setInterval(() => {
56
55
57
setTimeout(async () => {
58
console.log("\nWait over! Fetching…");
59
- const input_text = await (await fetch("https://adventofcode.com/"+year+"/day/"+soln_day+"/input", {
+ const input_text = await (await (await import("node-fetch").default)("https://adventofcode.com/"+year+"/day/"+soln_day+"/input", {
60
headers: {"Cookie": cookietext},
61
})).text();
62
fs.writeFileSync(txtfile_path, input_text, "utf-8");
0 commit comments