mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-09 22:37:08 +00:00
Random user-agent
This commit is contained in:
parent
4e9b0ee0eb
commit
6d753efb8f
@ -10,7 +10,7 @@ import secrets
|
|||||||
import ssl
|
import ssl
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from typing import TYPE_CHECKING, Any, cast
|
from typing import TYPE_CHECKING, Any, cast
|
||||||
|
import uuid
|
||||||
from yarl import URL
|
from yarl import URL
|
||||||
|
|
||||||
from ..credentials import DEFAULT_CREDENTIALS, Credentials, get_default_credentials
|
from ..credentials import DEFAULT_CREDENTIALS, Credentials, get_default_credentials
|
||||||
@ -78,7 +78,8 @@ class SslAesTransport(BaseTransport):
|
|||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Connection": "close",
|
"Connection": "close",
|
||||||
"Accept-Encoding": "gzip, deflate",
|
"Accept-Encoding": "gzip, deflate",
|
||||||
"User-Agent": "Tapo CameraClient Android",
|
# "User-Agent": "Tapo CameraClient Android",
|
||||||
|
"User-Agent": _md5_hash(uuid.uuid4().bytes)
|
||||||
}
|
}
|
||||||
CIPHERS = ":".join(
|
CIPHERS = ":".join(
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user