def _get_files(playlist, start, end):
    """Extract files for download from playlist."""
    vod_start = 0
    for segment in playlist.segments:
        vod_end = vod_start + segment.duration
        start_condition = not start or vod_end > start
        end_condition = not end or vod_start < end
        if start_condition and end_condition:
            yield segment.uri
        vod_start = vod_end
