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
# frozen_string_literal: true | |
# https://adventofcode.com/2021 | |
module AdvantOfCode2021 | |
URL = 'https://adventofcode.com/2021/day/%d/input' | |
COOKIE = 'Nope' | |
def parse_reading(day) | |
day_url = URL % day | |
HTTParty.get(day_url, headers: { 'Cookie' => COOKIE }).body.split("\n") |
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
# https://adventofcode.com/2021 | |
module AdventOfCode2021 | |
URL = 'https://adventofcode.com/2021/day/%d/input' | |
COOKIE = 'NOPE' | |
def parse_reading(day) | |
day_url = URL % day | |
HTTParty.get(day_url, headers: { 'Cookie' => COOKIE }).body.split("\n") | |
end |