OpenCV could be helpful for this kind of task. This post covers a similar task and could give you some inspiration on how to tackle the problem (but in C++): How to extracting line of text from image using OpenCV
Another lengthy post can be found here (all python): Simple Digit Recognition OCR in OpenCV-Python