def get_urls(status):
    """Return the expanded (non-media) URLs in a tweet"""
    # Check if the tweet has entities with expanded urls
    try:
        urls = [format(url['expanded_url']) for url in status.entities['urls']]
    except AttributeError:
        urls = []
    return urls