def clean_recs(recs):
    """
    Cleans the html source containing the recommendations and
    returns a dictionary containing the recommendations.

    Parameter:
        recs: html-recommendations extracted using bs4
    Returns:
        cleaned_recs: list of extracted recommendations
    """

    cleaned_recs = list()
    for rec in recs:
        name = rec.find('div', {'style': 'margin-bottom: 2px;'}).text.replace('\n', '').strip()[:-13]
        try:
            num = int(rec.find('div', {'class': 'spaceit'}).text[24:-10]) + 1
        except AttributeError:
            num = 1
        cleaned_recs.append([name, num])
    return cleaned_recs