mirror of
https://github.com/paradizelost/AdventOfCode2020.git
synced 2024-11-25 02:44:45 -06:00
9 lines
386 B
PowerShell
9 lines
386 B
PowerShell
|
$cookievalue = get-content .\Cookie.txt
|
||
|
$cookie = New-Object system.net.cookie
|
||
|
$cookie.name="session"
|
||
|
$cookie.domain = "adventofcode.com"
|
||
|
$cookie.Value=$cookievalue
|
||
|
$websession = new-object Microsoft.PowerShell.Commands.WebRequestSession
|
||
|
$websession.cookies.add($cookie)
|
||
|
$inputdata = Invoke-RestMethod -Uri https://adventofcode.com/2020/day/12/input -Method GET -WebSession $websession
|