import re


def extract_value(content, key, is_int_value=True, delimiter='=', throw_not_found=False, default_value=-1):
    """
    Extracts a key from content, value can be an integer or string
    Args:
        content (str): the full given text content
        key (str): the wanted key to be searched in the given content
        is_int_value (bool): determines if the key's value is int or string, which effects the search and parsing of the value
        delimiter (str): the separator between the key and it's value to be splitted by
        throw_not_found (bool): a flag determines if to raise a LookupError
        default_value (any): the value returned upon not finding the key in the content while not throwing an error
    Raises:
        LookupError: throw_not_found is true and key could not be found
        ValueError: is_int_value is true and the value is not a positive integer or an error while parsing the value
    Returns:
        (int|str): the extracted value
    """
    if is_int_value:
        match = re.search(fr'{key}=\d+', content)
    else:
        match = re.search(fr'{key}=\S+', content)
    if not match:
        if throw_not_found:
            raise LookupError(f'"{key}=" is not present in the given content')
        else:
            return default_value
    
    value = match.group(0).split(delimiter)[1]
    try:
        return int(value) if is_int_value else str(value)
    except ValueError:
        raise ValueError('an error accourd while extraction.')