-
-
Save voidhawk42/19bc13b59354ba5b20cea2314230c1fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pget←{ | |
(year pnum)←⍕¨⍵ | |
path←'C:\aocapl\',year,'\in\',pnum,'.txt' ⍝ Replace with your problem input storage path | |
⎕NEXISTS path:⊃⎕NGET path 1 | |
cookie←⊃⊃⎕NGET'c:\aoc2020apl\cookie.txt' 1 ⍝ Place cookie in this file | |
url←'https://adventofcode.com/',year,'/day/',pnum,'/input' | |
resp←HttpCommand.Get url''('cookie'cookie) | |
(⎕UCS 10)(≠⊆⊢)resp.Data⊣resp.Data ⎕NPUT path 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment