simplex 1.2.23__tar.gz → 1.2.25__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of simplex might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: simplex
3
- Version: 1.2.23
3
+ Version: 1.2.25
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="simplex",
5
- version="1.2.23",
5
+ version="1.2.25",
6
6
  packages=find_packages(),
7
7
  package_data={
8
8
  "simplex": ["browser_agent/dom/*.js"], # Include JS files in the dom directory
@@ -47,7 +47,8 @@ def run(directory):
47
47
 
48
48
  @cli.command()
49
49
  @click.argument('website')
50
- def login(website):
50
+ @click.option('--proxies', type=bool, default=True, help='Enable proxy support (default: True)')
51
+ def login(website, proxies):
51
52
  """Capture login session for a website"""
52
53
  try:
53
54
  # Initialize Simplex with API key from environment
@@ -62,18 +63,13 @@ def login(website):
62
63
  website = 'https://' + website
63
64
 
64
65
  animated_print(f"[SIMPLEX] Creating login session for {website}")
65
- result = simplex.create_login_session(website)
66
+ login_session_url = simplex.create_login_session(website, proxies=proxies)
66
67
 
67
- if result.get('succeeded'):
68
- # Open the login URL in a new browser tab
69
- login_url = result.get('login_session_url')
70
- if login_url:
71
- animated_print("[SIMPLEX] Opening login page in your browser")
72
- webbrowser.open_new_tab(login_url)
73
- else:
74
- print(f"{Fore.YELLOW}[SIMPLEX] Warning: No login URL returned from the server{Style.RESET_ALL}")
68
+ if login_session_url:
69
+ animated_print("[SIMPLEX] Opening login page in your browser")
70
+ webbrowser.open_new_tab(login_session_url)
75
71
  else:
76
- print(f"{Fore.RED}[SIMPLEX] Failed to capture login session: {result.get('error', 'Unknown error')}{Style.RESET_ALL}")
72
+ print(f"{Fore.YELLOW}[SIMPLEX] Warning: No login URL returned from the server{Style.RESET_ALL}")
77
73
  except Exception as e:
78
74
  raise click.ClickException(str(e))
79
75
  finally:
@@ -1,6 +1,6 @@
1
1
  import requests
2
2
  import atexit
3
-
3
+ from typing import Optional
4
4
  BASE_URL = "https://simplex--api-server-fastapi-app-dev.modal.run"
5
5
 
6
6
  import json
@@ -22,6 +22,7 @@ class Simplex:
22
22
  data={'session_id': self.session_id}
23
23
  )
24
24
  self.session_id = None
25
+
25
26
  if response.json()["succeeded"]:
26
27
  return
27
28
  else:
@@ -261,13 +262,13 @@ class Simplex:
261
262
  else:
262
263
  raise ValueError(f"Failed to wait: {response.json()['error']}")
263
264
 
264
- def create_login_session(self, url: str):
265
+ def create_login_session(self, url: str, proxies: Optional[bool] = True):
265
266
  response = requests.post(
266
267
  f"{BASE_URL}/create_login_session",
267
268
  headers={
268
269
  'x-api-key': self.api_key
269
270
  },
270
- data={'url': url}
271
+ data={'url': url, 'proxies': proxies}
271
272
  )
272
273
  if response.json()["succeeded"]:
273
274
  return response.json()["login_session_url"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: simplex
3
- Version: 1.2.23
3
+ Version: 1.2.25
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -0,0 +1,13 @@
1
+ from simplex import Simplex
2
+ import os
3
+ from dotenv import load_dotenv
4
+ import time
5
+
6
+ load_dotenv()
7
+
8
+ def login():
9
+ simplex = Simplex(api_key=os.getenv("SIMPLEX_API_KEY"))
10
+ print(simplex.create_login_session("buildops.com"))
11
+
12
+ if __name__ == "__main__":
13
+ login()
@@ -1,37 +0,0 @@
1
- from simplex import Simplex
2
- import os
3
- from dotenv import load_dotenv
4
- import time
5
-
6
- load_dotenv()
7
-
8
- def login():
9
- simplex = Simplex(api_key=os.getenv("SIMPLEX_API_KEY"))
10
- simplex.create_session()
11
- # simplex.goto("https://browser-tests-alpha.vercel.app/api/upload-test")
12
- simplex.wait(10000)
13
- print("goto: ", simplex.goto("https://dropbox.com"))
14
- # simplex.restore_login_session("dropbox_com_session_data.json")
15
- # simplex.goto("https://dropbox.com/")
16
- # simplex.click("Upload or drop")
17
- # simplex.click_and_upload("File", "ycombinator.svg")
18
- # print(simplex.exists("Download button"))
19
- # files = simplex.click_and_download("Download File")
20
- # import base64
21
- # print(files)
22
- # # Decode base64 string to bytes
23
- # file_bytes = base64.b64decode(files['b64'])
24
-
25
- # # Create downloads directory if it doesn't exist
26
- # os.makedirs('downloads', exist_ok=True)
27
-
28
- # # Write bytes to file
29
- # with open(os.path.join('downloads', files['filename']), 'wb') as f:
30
- # f.write(file_bytes)
31
-
32
- # simplex.goto("https://file-examples.com/wp-content/storage/2018/04/file_example_AVI_480_750kB.avi")
33
- # print(simplex.restore_login_session("zillow_com_session_data.json"))
34
- # simplex.goto("https://zillow.com")
35
-
36
- if __name__ == "__main__":
37
- login()
File without changes
File without changes
File without changes
File without changes
File without changes