about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--scrape.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/scrape.rb b/scrape.rb index 92730a5..a28f4c5 100644 --- a/scrape.rb +++ b/scrape.rb
@@ -12,7 +12,11 @@ achieves = usernames.map do |username|
12 data = JSON.parse(script[0..script.index(";\r\n\t\t")-1]) 12 data = JSON.parse(script[0..script.index(";\r\n\t\t")-1])
13 ids = data.map { |d| d["appid"] } 13 ids = data.map { |d| d["appid"] }
14 14
15 index = 0
15 ids.map do |id| 16 ids.map do |id|
17 index += 1
18 puts "#{username} - #{index}/#{ids.count}"
19
16 achsp = Nokogiri::HTML(open("https://steamcommunity.com/#{username}/stats/#{id}/")) 20 achsp = Nokogiri::HTML(open("https://steamcommunity.com/#{username}/stats/#{id}/"))
17 achsp.css(".achieveTxt .achieveUnlockTime + h3").map { |d| d.text } 21 achsp.css(".achieveTxt .achieveUnlockTime + h3").map { |d| d.text }
18 end 22 end