def list_subtitles(videos, languages, **kwargs):
    listed_subtitles = defaultdict(list)

    # check videos
    checked_videos = []
    for video in videos:
        if not check_video(video, languages=languages):
            logger.info('Skipping video %r', video)
            continue
        checked_videos.append(video)

    # return immediatly if no video passed the checks
    if not checked_videos:
        return listed_subtitles

    # list subtitles
    with ProviderPool(**kwargs) as pool:
        for video in checked_videos:
            logger.info('Listing subtitles for %r', video)
            subtitles = pool.list_subtitles(video, languages - video.subtitle_languages)
            listed_subtitles[video].extend(subtitles)
            logger.info('Found %d subtitle(s)', len(subtitles))

    return listed_subtitles
Concatenates the text from several XML nodes.
dataset/ETHPy150Open Diaoul/subliminal/subliminal/api.py/list_subtitles--crossover with--dataset/ETHPy150Open googlearchive/compute-appengine-demo-suite-python/demo-suite/lib/google_cloud/cs.py/Cs._get_text