diff --git a/adspower/types.py b/adspower/types.py index 905b6dc..27fdfa8 100644 --- a/adspower/types.py +++ b/adspower/types.py @@ -1,4 +1,4 @@ -from typing import TypedDict, Literal, NotRequired, Any, Callable +from typing import TypedDict, Literal, Optional, Any, Callable HandlingTuple = tuple[dict[str, dict | str], Callable[[dict[str, Any]], Any] | Callable[[], Any]] @@ -60,42 +60,42 @@ class BrowserKernelConfig(TypedDict): class FingerprintConfig(TypedDict): - automatic_timezone: NotRequired[IntBool] - timezone: NotRequired[str] - webrtc: NotRequired[WebRtcType] - location: NotRequired[LocationType] - location_switch: NotRequired[IntBool] - longitude: NotRequired[float] - latitude: NotRequired[float] - accuracy: NotRequired[int] - language: NotRequired[list[str]] - language_switch: NotRequired[IntBool] - page_language_switch: NotRequired[IntBool] - page_language: NotRequired[str] - ua: NotRequired[str] - screen_resolution: NotRequired[str] - fonts: NotRequired[list[str]] - canvas: NotRequired[IntBool] - webgl_image: NotRequired[IntBool] - webgl: NotRequired[WebGLVersion] - webgl_config: NotRequired[WebGLConfig] - audio: NotRequired[IntBool] - do_not_track: NotRequired[IntBool] - hardware_concurrency: NotRequired[int] - device_memory: NotRequired[int] - flash: NotRequired[IntBool | FlashType] - scan_port_type: NotRequired[IntBool] - allow_scan_ports: NotRequired[list[int]] - media_devices: NotRequired[MediaDeviceType] - media_devices_num: NotRequired[MediaDeviceConfig] - client_rects: NotRequired[IntBool] - device_name_switch: NotRequired[DeviceNameType] - device_name: NotRequired[str] - random_ua: NotRequired[RandomUserAgent] - speech_switch: NotRequired[IntBool] - mac_address_config: NotRequired[MacAddressConfig] - browser_kernel_config: NotRequired[BrowserKernelConfig] - gpu: NotRequired[GPUType] + automatic_timezone: Optional[IntBool] + timezone: Optional[str] + webrtc: Optional[WebRtcType] + location: Optional[LocationType] + location_switch: Optional[IntBool] + longitude: Optional[float] + latitude: Optional[float] + accuracy: Optional[int] + language: Optional[list[str]] + language_switch: Optional[IntBool] + page_language_switch: Optional[IntBool] + page_language: Optional[str] + ua: Optional[str] + screen_resolution: Optional[str] + fonts: Optional[list[str]] + canvas: Optional[IntBool] + webgl_image: Optional[IntBool] + webgl: Optional[WebGLVersion] + webgl_config: Optional[WebGLConfig] + audio: Optional[IntBool] + do_not_track: Optional[IntBool] + hardware_concurrency: Optional[int] + device_memory: Optional[int] + flash: Optional[IntBool | FlashType] + scan_port_type: Optional[IntBool] + allow_scan_ports: Optional[list[int]] + media_devices: Optional[MediaDeviceType] + media_devices_num: Optional[MediaDeviceConfig] + client_rects: Optional[IntBool] + device_name_switch: Optional[DeviceNameType] + device_name: Optional[str] + random_ua: Optional[RandomUserAgent] + speech_switch: Optional[IntBool] + mac_address_config: Optional[MacAddressConfig] + browser_kernel_config: Optional[BrowserKernelConfig] + gpu: Optional[GPUType] class DebugInterface(TypedDict):