From cd650991bc82e7d8a52f7ddcb636da8546d8d517 Mon Sep 17 00:00:00 2001 From: silva guimaraes Date: Sat, 28 Jun 2025 16:49:36 -0300 Subject: [PATCH] doc --- lib/lib.ml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/lib.ml b/lib/lib.ml index 7973403..6ca8b0f 100644 --- a/lib/lib.ml +++ b/lib/lib.ml @@ -85,7 +85,7 @@ type tournament_scrape_context = { season : int; name : string; filter_foreigners : bool; - timezone_offset : int option (* we assumes UTC-3 if None *); + timezone_offset : int option (* assumes UTC-3 if None *); } [@@deriving show] @@ -195,7 +195,6 @@ let matches_of_api_events (e : api_events) = { injury_time1 = x; injury_time2 = y; - (* second_half_start_timestamp = z; *) } | { injuryTime1 = None; @@ -216,14 +215,14 @@ let matches_of_api_events (e : api_events) = }) let fetch_matches ctx = - let g order = + let g order (* "last" for previous matches "next" for future matches *) = try sprintf - (* TLS fingerprinting is inplace and it's been used to block our requests once + (* TLS fingerprinting is in place and it's been used to block our requests once their systems detect we've been abusing their private API. TLS handshakes can only happen with secure connections using - HTTPS, so using plain HTTP makes it impossoble for that to happen, which they - do accept. *) + HTTPS, so using plain HTTP makes it impossible for that to happen, + which they do generously accept. *) "http://www.sofascore.com/api/v1/unique-tournament/%d/season/%d/events/%s/0" ctx.id ctx.season order |> get |> Yojson.Safe.from_string |> api_events_of_yojson