|
|
@ -15,7 +15,7 @@ Input getInput(int day, std::string key, bool useTestInput) { |
|
|
|
if (key.empty()) |
|
|
|
if (key.empty()) |
|
|
|
return input; |
|
|
|
return input; |
|
|
|
std::string dayStr = std::to_string(day); |
|
|
|
std::string dayStr = std::to_string(day); |
|
|
|
std::string url = "https://adventofcode.com/2021/day/" + dayStr + "/input"; |
|
|
|
std::string url = "https://adventofcode.com/2022/day/" + dayStr + "/input"; |
|
|
|
std::cout << "Input does not exist. Fetching from " + url << std::endl; |
|
|
|
std::cout << "Input does not exist. Fetching from " + url << std::endl; |
|
|
|
std::ofstream file(localFilePath); |
|
|
|
std::ofstream file(localFilePath); |
|
|
|
file << cpr::Get(cpr::Url{url}, cpr::Cookies{{"session", key}}).text; |
|
|
|
file << cpr::Get(cpr::Url{url}, cpr::Cookies{{"session", key}}).text; |
|
|
|