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),
|
"https://adventofcode.com/%d/day/%d/input" % (self.year, self.day),
|
||||||
cookies={'session': session_id}
|
cookies={'session': session_id}
|
||||||
)
|
)
|
||||||
print(response)
|
if not response.ok:
|
||||||
print(response.content)
|
print("FAILED to download input: (%s) %s" % (response.status_code, response.text))
|
||||||
if response.status_code != 200:
|
return
|
||||||
print("FAIL")
|
|
||||||
with open(filename, "wb") as f:
|
with open(filename, "wb") as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user