aggregation_modules/custom_functions.py
def extract_from_ua(ua_string, to_extract):
    """
    extracts requested info from User Agent String
    """
    client_info = httpagentparser.detect(ua_string)
    if to_extract in client_info:
        if client_info[to_extract]["name"] is not None:
            return client_info[to_extract]["name"]
    return str("invalid")

    extracts requested info from User Agent String
    
extracts requested info from User Agent String
extracts requested info from User Agent String
def extract_from_ua(ua_string, to_extract):
    client_info = httpagentparser.detect(ua_string)
    if to_extract in client_info:
        if client_info[to_extract]["name"] is not None:
            return client_info[to_extract]["name"]
    return str("invalid")
def extract_from_ua ( ua_string , to_extract ) : client_info = httpagentparser . detect ( ua_string ) if to_extract in client_info : if client_info [ to_extract ] [ "name" ] is not None : return client_info [ to_extract ] [ "name" ] return str ( "invalid" )
extracts requested info from User Agent String
extracts requested info from User Agent String
"""
    extracts requested info from User Agent String
    """
ua_string
to_extract