mjpeg.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:homeassistant 作者: NAStools 项目源码 文件源码
def __init__(self, hass, device_info):
        """Initialize a MJPEG camera."""
        super().__init__()
        self._name = device_info.get(CONF_NAME)
        self._authentication = device_info.get(CONF_AUTHENTICATION)
        self._username = device_info.get(CONF_USERNAME)
        self._password = device_info.get(CONF_PASSWORD)
        self._mjpeg_url = device_info[CONF_MJPEG_URL]

        self._auth = None
        if self._username and self._password:
            if self._authentication == HTTP_BASIC_AUTHENTICATION:
                self._auth = aiohttp.BasicAuth(
                    self._username, password=self._password
                )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号