mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2024-12-18 20:24:27 -05:00
Update
This commit is contained in:
parent
db3372eaaa
commit
2ad89e7645
@ -13,15 +13,15 @@ Dir.entries("./weapons").each do | name |
|
|||||||
lang = `curl -s https://api.github.com/repos/#{t[3]}/#{t[4]}/languages | jq 'to_entries | max_by(.value) | .key'`
|
lang = `curl -s https://api.github.com/repos/#{t[3]}/#{t[4]}/languages | jq 'to_entries | max_by(.value) | .key'`
|
||||||
lang_str = lang.gsub("\"","").gsub("\n","")
|
lang_str = lang.gsub("\"","").gsub("\n","")
|
||||||
if lang_str != "documentation_url"
|
if lang_str != "documentation_url"
|
||||||
puts 'hit'
|
puts "hit #{filename}"
|
||||||
data['lang'] = lang_str
|
data['lang'] = lang_str
|
||||||
yaml_data = YAML.dump(data)
|
yaml_data = YAML.dump(data)
|
||||||
File.write("./weapons/#{filename}", yaml_data)
|
File.write("./weapons/#{filename}", yaml_data)
|
||||||
langs.push lang_str
|
langs.push lang_str
|
||||||
else
|
else
|
||||||
puts 'denied'
|
puts "denied #{filename}"
|
||||||
end
|
end
|
||||||
sleep(1.5.minutes)
|
sleep(90)
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user