def select_thumbnail(snippet):
    """Select the thumbail of a YouTube video"""
    thumbnails = sorted(
        snippet["snippet"]["thumbnails"].values(),
        key=lambda x: -x["width"]
    )
    for thumbnail in thumbnails:
        if thumbnail["width"] / thumbnail["height"] == 16. / 9:
            return thumbnail["url"]
    return ""