Skip to content

Instantly share code, notes, and snippets.

@Moelf
Created January 20, 2022 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Moelf/59f175922200cfa9f36155733c51da78 to your computer and use it in GitHub Desktop.
Save Moelf/59f175922200cfa9f36155733c51da78 to your computer and use it in GitHub Desktop.
howlongtobeat api

https://howlongtobeat.com/

julia> get_hour("horizon zero dawn")44.0

julia> get_hour("Celeste")
8.0

julia> get_hour("Portal 2")
21.0

julia> get_hour("Factorio")
213.0
get_hl2b(game) = HTTP.post("https://howlongtobeat.com/search_results?page=1", ["User-Agent" => "Mozilla/5.0", "Content-Type" => "application/x-www-form-urlencoded"], "queryString=$game&t=games&sorthead=popular").body |> String;
get_hour(game) = parse(Float64, match(r"(\d+) Hour", get_hl2b(game)).captures[1])get_hour (generic function with 1 method)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment