browserbase / python-sdk

Deprecated Browserbase Python SDK
https://github.com/browserbase/sdk-python
MIT License
9 stars 3 forks source link

`CreateSessionOptions` include proxies option #3

Closed N-Demir closed 2 months ago

N-Demir commented 2 months ago

I noticed that Browserbase.create_session(...) isn't well documented but exists. Would be easier to use this function than the code on the API docs for creating a session with proxies enabled, but setting proxies=true doesn't seem possible with CreateSessionOptions defined as

class CreateSessionOptions(BaseModel):
    projectId: Optional[str] = None
    extensionId: Optional[str] = None
    browserSettings: Optional[BrowserSettings] = None
    timeout: Optional[int] = None
    keepAlive: Optional[bool] = None

I would expect a python sdk api like .create_session(proxies=True)

N-Demir commented 2 months ago

never mind I see that proxy is an option for .get_connect_url()

N-Demir commented 2 months ago

You may want to consider updating this example then or your api to not cause confusion between the two. The docs make it seem like proxy should be set at a session level rather than at a connection level: https://docs.browserbase.com/features/stealth-mode#proxy-configuration-options