You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As is, the berserk timestamps are completely ignored.
What I Did
Try running the example from the docs, but I changed to a 10 minute window:
start = berserk.utils.to_millis(dt.datetime(2018, 12, 8, 1, 10))
end = berserk.utils.to_millis(dt.datetime(2018, 12, 8, 1, 20))
print(f'Query from {start} to {end}')
games = lichess.games.export_by_player('LeelaChess', since=start, until=end, max=300)
print(f'Found {len(list(games))} Leela games')
start, end = int(start), int(end) # Convert to ints
print(f'Query from {start} to {end}')
games = lichess.games.export_by_player('LeelaChess', since=start, until=end, max=300)
print(f'Found {len(list(games))} Leela games')
Output:
Query from 1544260200000.0 to 1544260800000.0
Found 300 Leela games # Hit max!
Query from 1544260200000 to 1544260800000
Found 3 Leela games # Presumably correct
The text was updated successfully, but these errors were encountered:
Description
Games export API expects integer timestamps, but berserk sends floats.
If you go here: https://lichess.org/api#operation/apiGamesUser
You see that
since
anduntil
expect integers.utils.to_millis(dt)
does not return integer seconds, it returns floats, per https://docs.python.org/3/library/datetime.html#datetime.datetime.timestampAs is, the berserk timestamps are completely ignored.
What I Did
Try running the example from the docs, but I changed to a 10 minute window:
Output:
The text was updated successfully, but these errors were encountered: