diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-02 18:49:58 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-02 18:49:58 -0500 |
commit | 13aab8498a0a2d4494a088f1235a0e80c078bdcf (patch) | |
tree | bcacfd07a1e2d1b7942cc35dc587c245f60ee5c3 | |
parent | bbe334b6c9249fea57dee53a0804693dab46f03c (diff) | |
download | lunatic-13aab8498a0a2d4494a088f1235a0e80c078bdcf.tar.gz lunatic-13aab8498a0a2d4494a088f1235a0e80c078bdcf.tar.bz2 lunatic-13aab8498a0a2d4494a088f1235a0e80c078bdcf.zip |
Fixed scraping of images from age-restricted games
-rw-r--r-- | scrape.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scrape.rb b/scrape.rb index dfeb356..8ba4b68 100644 --- a/scrape.rb +++ b/scrape.rb | |||
@@ -91,8 +91,11 @@ def scrape_profile(profile, full) | |||
91 | game = Game.new(steam_appid: id, color: MOON_COLORS[moon_index]) | 91 | game = Game.new(steam_appid: id, color: MOON_COLORS[moon_index]) |
92 | game.save | 92 | game.save |
93 | 93 | ||
94 | # The cookie is required for games that have an age restriction | ||
94 | storepage = Nokogiri::HTML( | 95 | storepage = Nokogiri::HTML( |
95 | open("http://store.steampowered.com/app/#{id}")) | 96 | open( |
97 | "http://store.steampowered.com/app/#{id}", | ||
98 | "Cookie" => 'birthtime=126248401')) | ||
96 | 99 | ||
97 | img_id = 0 | 100 | img_id = 0 |
98 | storepage.css(".highlight_screenshot_link").each do |node| | 101 | storepage.css(".highlight_screenshot_link").each do |node| |