def get_entry_thumbnail_url(entry):
    """
    Returns the URL for a thumbnail from a feedparser entry, or ``None`` if
    no thumbnail is found. First tries to return the thumbnail for the default
    enclosure, then for any enclosure, then for the entry in general. If these
    all fail and the entry is from youtube, the content of the entry will be
    searched for an image to use as the thumbnail.

    """
    enclosures = get_accepted_enclosures(entry)

    # Try the default enclosure's thumbnail.
    default_enclosure = get_default_enclosure(enclosures)
    if default_enclosure is not None:
        try:
            return get_item_thumbnail_url(default_enclosure)
        except KeyError:
            pass

    # Try to get any enclosure thumbnail
    for enclosure in enclosures:
        if enclosure is not default_enclosure:
            try:
                return get_item_thumbnail_url(enclosure)
            except KeyError:
                pass

    # Try to get the general thumbnail for the entry
    try:
        return get_item_thumbnail_url(entry)
    except KeyError:
        pass

    # Check the content
    if entry.get('link', '').find(u'youtube.com') != -1:
        if 'content' in entry:
            content = entry['content'][0]['value']
        elif entry in 'summary':
            content = entry['summary']
        else:
            return None
        match = re.search(r'<img alt="" src="([^"]+)" />',
                          content)
        if match:
            return match.group(1)

    return None
dataset/ETHPy150Open pculture/vidscraper/vidscraper/utils/feedparser.py/get_entry_thumbnail_url/swapped operands of `in`