If this is confusing, you’re probably missing context. Check out Managing Website Credentials in the Getting Started section for more information.

As stated in the Getting Started section, you can create a login session using the simplex login CLI.

simplex login https://example.com

After you log in, you can click the button on the page to capture the login session. This will download a JSON containing your session data.

If you’d instead like to use the SDK, you can use the create_login_session method.

create_login_session

def create_login_session(
    self,
    url: str,
) -> Tuple[bool, str]:
url
string
required

The URL of the website you want to create a login session for.

return
None

The browser will open to the login session page where you can enter your credentials.

Sample Usage

from simplex import Simplex
simplex = Simplex(api_key="your_api_key")
simplex.create_login_session("https://www.zillow.com")

Restoring login sessions

Login sessions can be restored using the session_data parameter in the constructor.

We show an example below. Let’s say you have a login session JSON for Zillow stored at sessions/zillow_login_session.json.

Sample Usage

from simplex import Simplex
simplex = Simplex(api_key="your_api_key")
simplex.create_session(session_data="sessions/zillow_login_session.json")
simplex.goto("https://www.zillow.com")