Times returned by the API
Closed this issue · 2 comments
Dear Martin,
I have downloaded your software and I have found it interesting.
However, I have found a problem: The times returned by the API for all the
riders except the winner are 0 in some cases.
I have been checking if the problem was mine, but I think the problem is
derived from the data stored in procyclingstats.
I think the times are stored in two different formats: HH:MM:SS and MM.SS.
I am sending you two examples of web pages with those two formats:
https://www.procyclingstats.com/race/world-championship-itt/2024
https://www.procyclingstats.com/race/tour-de-france/2024/stage-5
When using your api on the first web page, it works fine.
When using your api on the second web page, it returns times with zero values.
I think the error might be in the function "_make_times_absolute",
but I am not sure. Maybe this function does not work properly when
times are in the MM.SS format.
Let me know if you can take a look it. Otherwise, I could try it, but I am not
an expert in Python.
Thanks a lot for your help.
Thanks for repporting an issue. It was because of different time format in some TTs and it's fixed now. This change is not yet pushed on PyPI so to use latest version with the fix you will have to clone repo manually from github.
Thanks a lot for such a quick help.