def extract_media_url(media):
    """extracts the url of a media item: an image post, or an image within a gallary

    I extract the data from the first items in "display_resources" instead of the standard "display_url" because this is
    the lowest resolution available
    """
    return media["display_resources"][0]["src"]