from datetime import datetime


def get_alert_values(root):
    """Finds important alert info, returned in this order:
    1. Alert header
    2. Alert type
    3. Alert status
    4. Alert confidence
    5. Alert latitude (of radiative center)
    6. Alert longitude (of radiative center)
    7. Alert date and time (datetime object)
    8. Satellite identifier number"""

    wmo_id = root.summary.wmo_spacecraft_id.attrib.get('value').strip()
    alert_header = root.alert.alert_header.attrib.get('value').strip()
    alert_type = root.alert.alert_type.attrib.get('value')
    status = root.alert.status.attrib.get('value')
    confidence = root.alert.confidence.attrib.get('value')
    method = root.alert.method.attrib.get('value')
    lat_rc = float(root.alert.lat_rc.attrib.get('value'))
    lon_rc = float(root.alert.lon_rc.attrib.get('value'))
    date_time = root.alert.object_date_time.attrib.get('value') #Put into datetime object
    date_time = datetime.strptime(date_time, '%Y-%m-%d %H:%M:%S')
    return alert_header, alert_type, status, confidence, method, lat_rc, lon_rc, date_time, wmo_id