# This is the port Kameleo.CLI is listening on. Default value is 5050, but can be overridden in appsettings.json file
kameleoBaseUrl = 'http://localhost:5050'
kam_client = KameleoLocalApiClient(kameleoBaseUrl)
# Search Chrome Base Profiles
base_profiles = kam_client.search_base_profiles(
device_type='desktop',
browser_product='chrome'
)
# Create a new profile with recommended settings
# Choose one of the Base Profiles
create_profile_request = BuilderForCreateProfile \
.for_base_profile(base_profiles[0].id) \
.set_recommended_defaults() \
.build()
kam_profile = kam_client.create_profile(body=create_profile_request)
# Start the browser profile
kam_client.start_profile(kam_profile.id)
options = webdriver.ChromeOptions()
options.add_experimental_option("kameleo:profileId", kam_profile.id)
driver = webdriver.Remote(
command_executor=f'{kameleoBaseUrl}/webdriver',
options=options
)
Windows IP Configuration
Ethernet adapter Ethernet 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Unknown adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Unknown adapter OpenVPN TAP-Windows6:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::a4bf:418d:6794:9d00%12
IPv4 Address. . . . . . . . . . . : 172.20.10.2
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . : 172.20.10.1
Ethernet adapter Ethernet 2:
Media State . . . . . . . . . . . : Media disconnected