def get_links(rlinks):
    """
    returns list of titles/urls from query/parse links response
    """
    if rlinks is None:
        return
    links = []
    for item in rlinks:
        if 'url' in item:
            links.append(item['url'])
        if 'title' in item and 'ns' in item:
            if item['ns'] == 0:
                links.append(item['title'])
    return sorted(links) if links else None
