I'd like to be able to automate downloading specific games that have been played on Lichess. Is there any software available that, if given useful information such as the Lichess usernames, colours, time control and (approximate) time of the game will download the game in pgn format? Command line please - ideally it will also flag an error if it fails to find exactly one match.
I'm running Linux, but as I expect anything that might exist will be in something like python I don't think that is a big issue.