def _get_matching_stream(smap, itag):
    """ Return the url and signature for a stream matching itag in smap. """

    for x in smap:

        if x['itag'] == itag and x.get("s"):
            return x['url'], x['s']

    raise IOError("Sorry this video is not currently supported by pafy")