hass-aarlo icon indicating copy to clipboard operation
hass-aarlo copied to clipboard

List of User Agents

Open cloudbr34k84 opened this issue 2 years ago • 1 comments

what the list of User agents you can use?

cloudbr34k84 avatar Feb 20 '22 14:02 cloudbr34k84

These are the ones we currently support. If you don't use a recognized value we default to Chrome.

        if agent.lower() == "arlo":
            return (
                "Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) "
                "AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 "
                "(iOS Vuezone)"
            )
        elif agent.lower() == "iphone":
            return (
                "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) "
                "AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1"
            )
        elif agent.lower() == "ipad":
            return (
                "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) "
                "AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
            )
        elif agent.lower() == "mac":
            return (
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) "
                "AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15"
            )
        elif agent.lower() == "firefox":
            return (
                "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) "
                "Gecko/20100101 Firefox/85.0"
            )
        else:
            return (
                "Mozilla/5.0 (X11; Linux x86_64) "
                "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36"
            )

twrecked avatar Feb 21 '22 05:02 twrecked