auto input-download and answer-submit
This commit is contained in:
parent
149da572c2
commit
082c61beca
@ -84,10 +84,10 @@ class AOCDay:
|
||||
"https://adventofcode.com/%d/day/%d/input" % (self.year, self.day),
|
||||
cookies={'session': session_id}
|
||||
)
|
||||
print(response)
|
||||
print(response.content)
|
||||
if response.status_code != 200:
|
||||
print("FAIL")
|
||||
if not response.ok:
|
||||
print("FAILED to download input: (%s) %s" % (response.status_code, response.text))
|
||||
return
|
||||
|
||||
with open(filename, "wb") as f:
|
||||
f.write(response.content)
|
||||
f.flush()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user