def extract_highlights(soup, journal):
    """
    Function that extracts relevant highlight information from DOM tree based on
    the journal specified. Highlight entries that don't have all parameters 
    specified (image, title, authors, comment) are skipped.

    Parameters
    ----------
    soup : bs4.BeautifulSoup
        Html tree of a journal website where articles can be found.
    journal : str
        Journal the html tree was extracted from, one of 'cell', 'science', 'nature'.

    Returns
    -------
    entries : dict of str
        Parsed article highlights containg following keys:
            img: url of an image
            title: article title
            authors: article authors
            comment: commentary about the article
            
    """
    entries = []

    if(journal == "cell"):
        articles = soup.find(id = "Articles").parent.findAll("div", {"class": "articleCitation"})
        for item in articles:
            try:
                entries.append({
                    "img": item.find("div", {"class": "toc__item__cover"}).a.img['src'],
                    "title": item.find("h3", {"class": "toc__item__title"}).get_text().strip(),    
                    "authors": item.find("ul", {"class": "toc__item__authors"}).get_text().strip(),
                    "comment": item.find("div", {"class": "toc__item__details"}).get_text().strip()
                })
            # I don't really want the ones that don't have complete info, so I just skip them
            except (TypeError, AttributeError):
                continue
    if(journal == "science"):
        articles = soup.findAll('article')
        for item in articles:
            try:
                entries.append({
                    "img": item.find("div", {"class": "media__icon"}).a.img['src'],
                    "title": item.find("h2", {"class": "media__headline"}).get_text().strip(),    
                    "authors": item.find("p", {"class": "byline"}).get_text().strip(),
                    "comment": item.find("div", {"class": "media__deck"}).get_text().strip()
                })
            # I don't really want the ones that don't have complete info, so I just skip them
            except (TypeError, AttributeError):
                continue
    if(journal == "nature"):
        articles = soup.findAll('article')
        for item in articles:
            try:
                entries.append({
                    "img": item.find("div", {"class": "c-card__image"}).picture.img['src'],
                    "title": item.find("h3", {"class": "c-card__title"}).get_text().strip(),    
                    "authors": item.find("ul", {"class": "c-author-list"}).get_text().strip(),
                    "comment": item.find("div", {"class": "c-card__summary"}).get_text().strip()
                })
            # I don't really want the ones that don't have complete info, so I just skip them
            except (TypeError, AttributeError):
                continue
            
    return entries