Last active
August 29, 2015 14:00
-
-
Save dgellow/11344088 to your computer and use it in GitHub Desktop.
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
"[{\"title\":null,\"id\":null,\"steamcmd\":null,\"steam client\":null,\"anonymous login\":null,\"note\":null},{\"title\":\" Arma 3 Dedicated Server\",\"id\":\"233780\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Blade Symphony Dedicated Server\",\"id\":\"228780\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"\",\"note\":\"Beta. Game Purchase Required\\n\"},{\"title\":\" Counter-Strike Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Counter-Strike Global Offensive Dedicated Server\",\"id\":\"740\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Counter-Strike: Condition Zero Dedicated Server\",\"id\":\"232330\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod czero\\\"\\n\"},{\"title\":\" Counter-Strike: Source Dedicated Server\",\"id\":\"232330\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Day of Defeat Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod dod\\\"\\n\"},{\"title\":\" Day of Defeat: Source Dedicated Server\",\"id\":\"232290\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Deathmatch Classic Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod dmc\\\"\\n\"},{\"title\":\" Garry's Mod Dedicated Server\",\"id\":\"4020\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Half-Life 2: Deathmatch Dedicated Server\",\"id\":\"232370\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Half-Life Deathmatch: Source Dedicated server\",\"id\":\"255470\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Half-Life Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Half-Life: Opposing Force Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod gearbox\\\"\\n\"},{\"title\":\" Insurgency 2014 Dedicated Server\",\"id\":\"237410\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Insurgency Dedicated Server\",\"id\":\"17705\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Just Cause 2: Multiplayer - Dedicated Server\",\"id\":\"261140\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Killing Floor Dedicated Server - Linux\",\"id\":\"215360\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Left 4 Dead 2 Dedicated Server\",\"id\":\"222860\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Left 4 Dead Dedicated Server\",\"id\":\"510\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Natural Selection 2 Dedicated Server\",\"id\":\"4940\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" No More Room in Hell Dedicated Server\",\"id\":\"224260\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Pirates, Vikings, and Knights II Dedicated Server\",\"id\":\"17575\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Red Orchestra Linux Dedicated Server\",\"id\":\"223250\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Ricochet Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod ricochet\\\"\\n\"},{\"title\":\" Rust Dedicated Server\",\"id\":\"258550\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"\",\"note\":\"Currently only available to approved hosting companies\\n\"},{\"title\":\" Serious Sam 3 Dedicated Server\",\"id\":\"41080\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Source SDK Base 2006 MP Dedicated Server\",\"id\":\"205\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"Bug:Linux files missing\\n\"},{\"title\":\" Source 2007 Dedicated Server\",\"id\":\"310\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Source Dedicated Server\",\"id\":\"205\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Source SDK Base 2013 Dedicated Server\",\"id\":\"244310\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Team Fortress 2 Dedicated Server\",\"id\":\"232250\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Team Fortress Classic dedicated server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod tfc\\\"\\n\"},{\"title\":\" The Ship Dedicated Server\",\"id\":\"2403\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Zombie Panic Source Dedicated Server\",\"id\":\"17505\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"Yes\",\"note\":\"\\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
require 'open-uri' | |
require 'nokogiri' | |
require 'json' | |
doc = Nokogiri::HTML(open('https://developer.valvesoftware.com/wiki/Dedicated_Servers_List')) | |
table = doc.css('table')[1] | |
table.css('tr').map{|r| Hash[['title', 'id', 'steamcmd', 'steam client', 'anonymous login', 'note'].zip(r.css('td').map{|x| x.content})]}.to_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment