import re


def extract_only_numbers(text):
    """
    Little function to extract only numbers from a string. Usuful in OCR if we want to detect only digits.
    Also, in converts 'o's and 'O's to 0 since it appears to be hard for tesseract even if I fucking tell it to 
    parse only digits. GG google.
    
    :param text: A string
    :type text: str
    :return: string with only the digits
    :rtype: str
    """
    text = text.replace('O', '0')
    text = text.replace('o', '0')
    text = re.findall(r'\d+', text)
    return ''.join(text)