simplex 1.2.20__tar.gz → 1.2.22__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.
- {simplex-1.2.20 → simplex-1.2.22}/PKG-INFO +1 -1
- {simplex-1.2.20 → simplex-1.2.22}/setup.py +1 -1
- {simplex-1.2.20 → simplex-1.2.22}/simplex/simplex.py +3 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/PKG-INFO +1 -1
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/SOURCES.txt +2 -1
- simplex-1.2.22/tests/test.py +36 -0
- {simplex-1.2.20 → simplex-1.2.22}/LICENSE +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/README.md +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/pyproject.toml +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/setup.cfg +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex/__init__.py +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex/cli.py +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex/deploy/__init__.py +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex/deploy/push.py +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/dependency_links.txt +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/entry_points.txt +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/requires.txt +0 -0
- {simplex-1.2.20 → simplex-1.2.22}/simplex.egg-info/top_level.txt +0 -0
|
@@ -12,6 +12,8 @@ class Simplex:
|
|
|
12
12
|
atexit.register(self.close_session)
|
|
13
13
|
|
|
14
14
|
def close_session(self):
|
|
15
|
+
if not self.session_id:
|
|
16
|
+
return
|
|
15
17
|
response = requests.post(
|
|
16
18
|
f"{BASE_URL}/close-session",
|
|
17
19
|
headers={
|
|
@@ -20,6 +22,7 @@ class Simplex:
|
|
|
20
22
|
data={'session_id': self.session_id}
|
|
21
23
|
)
|
|
22
24
|
self.session_id = None
|
|
25
|
+
print(response.json())
|
|
23
26
|
if response.json()["succeeded"]:
|
|
24
27
|
return
|
|
25
28
|
else:
|
|
@@ -0,0 +1,36 @@
|
|
|
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_session())
|
|
11
|
+
# simplex.goto("https://browser-tests-alpha.vercel.app/api/upload-test")
|
|
12
|
+
simplex.goto("https://dropbox.com")
|
|
13
|
+
simplex.restore_login_session("dropbox_com_session_data.json")
|
|
14
|
+
simplex.goto("https://dropbox.com/")
|
|
15
|
+
simplex.click("Upload or drop")
|
|
16
|
+
simplex.click_and_upload("File", "ycombinator.svg")
|
|
17
|
+
# print(simplex.exists("Download button"))
|
|
18
|
+
# files = simplex.click_and_download("Download File")
|
|
19
|
+
# import base64
|
|
20
|
+
# print(files)
|
|
21
|
+
# # Decode base64 string to bytes
|
|
22
|
+
# file_bytes = base64.b64decode(files['b64'])
|
|
23
|
+
|
|
24
|
+
# # Create downloads directory if it doesn't exist
|
|
25
|
+
# os.makedirs('downloads', exist_ok=True)
|
|
26
|
+
|
|
27
|
+
# # Write bytes to file
|
|
28
|
+
# with open(os.path.join('downloads', files['filename']), 'wb') as f:
|
|
29
|
+
# f.write(file_bytes)
|
|
30
|
+
|
|
31
|
+
# simplex.goto("https://file-examples.com/wp-content/storage/2018/04/file_example_AVI_480_750kB.avi")
|
|
32
|
+
# print(simplex.restore_login_session("zillow_com_session_data.json"))
|
|
33
|
+
# simplex.goto("https://zillow.com")
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
login()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|