def get_data(upd, bot_ident):
    """Parse telegram update."""

    update_content = json.loads(upd.decode())
    result = update_content['result']
    data = (get_fields(update, bot_ident) for update in result)
    return (dt for dt in data if dt is not None)