diff options
-rw-r--r-- | scrape.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scrape.rb b/scrape.rb index 5d62e89..07faeb6 100644 --- a/scrape.rb +++ b/scrape.rb | |||
@@ -3,7 +3,7 @@ require 'nokogiri' | |||
3 | require 'open-uri' | 3 | require 'open-uri' |
4 | require 'yaml' | 4 | require 'yaml' |
5 | 5 | ||
6 | config = YAML.load(open("config.yml")) | 6 | config = YAML.load(open("lunatic/config.yml")) |
7 | usernames = config["usernames"] | 7 | usernames = config["usernames"] |
8 | 8 | ||
9 | achieves = usernames.map do |username| | 9 | achieves = usernames.map do |username| |
@@ -18,8 +18,8 @@ achieves = usernames.map do |username| | |||
18 | end | 18 | end |
19 | end.flatten | 19 | end.flatten |
20 | 20 | ||
21 | if File.exists?("achieves.txt") | 21 | if File.exists?(config["achievements"]) |
22 | already = File.read("achieves.txt").split("\n") | 22 | already = File.read(config["achievements"]).split("\n") |
23 | all_achieves = achieves + already | 23 | all_achieves = achieves + already |
24 | else | 24 | else |
25 | all_achieves = achieves | 25 | all_achieves = achieves |
@@ -33,6 +33,6 @@ if config.key? "blacklist" | |||
33 | all_achieves.reject! { |l| blacklist.include? l } | 33 | all_achieves.reject! { |l| blacklist.include? l } |
34 | end | 34 | end |
35 | 35 | ||
36 | File.open("achieves.txt", "w") do |f| | 36 | File.open(config["achievements"], "w") do |f| |
37 | f << all_achieves.join("\n") | 37 | f << all_achieves.join("\n") |
38 | end | 38 | end |