import requests


def cctop_check_status(jobid):
    """Check the status of a CCTOP job ID.

    Args:
        jobid (str): Job ID obtained when job was submitted

    Returns:
        str: 'Finished' if the job is finished and results ready to be downloaded, 'Running' if still in progress,
        'Invalid' for any errors.

    """
    status = 'http://cctop.enzim.ttk.mta.hu/php/poll.php?jobId={}'.format(jobid)
    status_text = requests.post(status)
    return status_text.text