mirror of
https://github.com/paradizelost/AdventOfCode2020.git
synced 2024-11-25 02:44:45 -06:00
staring of day 12, using the cookie to pull the data on the fly from the website.
This commit is contained in:
parent
5feb66cd75
commit
20ca3e9f09
8
Advent Of Code Day 12-part1.ps1
Normal file
8
Advent Of Code Day 12-part1.ps1
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
$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
|
Loading…
Reference in New Issue
Block a user