From 71bbb67cef911949057477151be2df23968720f8 Mon Sep 17 00:00:00 2001 From: Rene Luria Date: Mon, 29 Jun 2026 23:03:48 +0200 Subject: [PATCH] chore: remove debugging prints --- myice/myice.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/myice/myice.py b/myice/myice.py index e2fcb80..63743f9 100755 --- a/myice/myice.py +++ b/myice/myice.py @@ -594,16 +594,16 @@ mobile_headers = { } -def curl_for_mobile_login(username: str, password: str) -> str: - """Generate curl command to replicate mobile_login request.""" - import base64 +# def curl_for_mobile_login(username: str, password: str) -> str: +# """Generate curl command to replicate mobile_login request.""" +# import base64 - headers_str = " ".join([f"-H '{k}: {v}'" for k, v in mobile_headers.items()]) - encoded_username = base64.b64encode(username.encode()).decode() - encoded_password = base64.b64encode(password.encode()).decode() - return f"""curl -X POST "https://app.myice.hockey/api/mobilerest/login" \ -{headers_str} \ --d 'login_email={encoded_username}&login_password={encoded_password}&language=FR&v=2'""" +# headers_str = " ".join([f"-H '{k}: {v}'" for k, v in mobile_headers.items()]) +# encoded_username = base64.b64encode(username.encode()).decode() +# encoded_password = base64.b64encode(password.encode()).decode() +# return f"""curl -X POST "https://app.myice.hockey/api/mobilerest/login" \ +# {headers_str} \ +# -d 'login_email={encoded_username}&login_password={encoded_password}&language=FR&v=2'""" def mobile_login(config_section: str | None = None): @@ -619,7 +619,7 @@ def mobile_login(config_section: str | None = None): print("Requesting token", file=sys.stderr) # Print curl equivalent for debugging - print(curl_for_mobile_login(username, password), file=sys.stderr) + # print(curl_for_mobile_login(username, password), file=sys.stderr) with requests.post( "https://app.myice.hockey/api/mobilerest/login", headers=mobile_headers, @@ -643,19 +643,19 @@ userdata = { } -def curl_for_refresh_data(token: str, club_id: int) -> str: - """Generate curl command to replicate refresh_data request.""" - headers_str = " ".join([f"-H '{k}: {v}'" for k, v in mobile_headers.items()]) - return f"""curl -X POST "https://app.myice.hockey/api/mobilerest/refreshdata" \ -{headers_str} \ --d 'token={token}&id_club={club_id}&language=FR'""" +# def curl_for_refresh_data(token: str, club_id: int) -> str: +# """Generate curl command to replicate refresh_data request.""" +# headers_str = " ".join([f"-H '{k}: {v}'" for k, v in mobile_headers.items()]) +# return f"""curl -X POST "https://app.myice.hockey/api/mobilerest/refreshdata" \ +# {headers_str} \ +# -d 'token={token}&id_club={club_id}&language=FR'""" def refresh_data(): # Print curl equivalent for debugging - print( - curl_for_refresh_data(userdata["token"], userdata["id_club"]), file=sys.stderr - ) + # print( + # curl_for_refresh_data(user_data["token"], user_data["id_club"]), file=sys.stderr + # ) with requests.post( "https://app.myice.hockey/api/mobilerest/refreshdata", headers=mobile_headers,