create-browser-app 0.1.10__py3-none-any.whl → 0.1.12__py3-none-any.whl
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.
- create_browser_app/template_fetcher.py +13 -9
- {create_browser_app-0.1.10.dist-info → create_browser_app-0.1.12.dist-info}/METADATA +1 -1
- create_browser_app-0.1.12.dist-info/RECORD +9 -0
- create_browser_app-0.1.10.dist-info/RECORD +0 -9
- {create_browser_app-0.1.10.dist-info → create_browser_app-0.1.12.dist-info}/WHEEL +0 -0
- {create_browser_app-0.1.10.dist-info → create_browser_app-0.1.12.dist-info}/entry_points.txt +0 -0
- {create_browser_app-0.1.10.dist-info → create_browser_app-0.1.12.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
import
|
|
2
|
+
import requests
|
|
3
3
|
from typing import Dict, List, Optional
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
|
|
@@ -41,8 +41,11 @@ GITHUB_TEMPLATES: List[TemplateInfo] = [
|
|
|
41
41
|
name="proxies",
|
|
42
42
|
url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/proxies/main.py",
|
|
43
43
|
),
|
|
44
|
+
TemplateInfo(
|
|
45
|
+
name="gemini-cua",
|
|
46
|
+
url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/gemini-cua/main.py",
|
|
47
|
+
),
|
|
44
48
|
]
|
|
45
|
-
|
|
46
49
|
def get_template_by_name(name: str) -> Optional[TemplateInfo]:
|
|
47
50
|
"""Get a specific template by name."""
|
|
48
51
|
for template in GITHUB_TEMPLATES:
|
|
@@ -53,13 +56,14 @@ def get_template_by_name(name: str) -> Optional[TemplateInfo]:
|
|
|
53
56
|
def fetch_template_content(template: TemplateInfo) -> Optional[str]:
|
|
54
57
|
"""Fetch the content of a specific template from GitHub."""
|
|
55
58
|
try:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
59
|
+
response = requests.get(
|
|
60
|
+
template.url,
|
|
61
|
+
headers={"User-Agent": "create-browser-app-py"},
|
|
62
|
+
timeout=10
|
|
63
|
+
)
|
|
64
|
+
if response.status_code != 200:
|
|
65
|
+
return None
|
|
66
|
+
return response.text
|
|
63
67
|
except Exception:
|
|
64
68
|
return None
|
|
65
69
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
create_browser_app/__init__.py,sha256=izlkaSvrxNqPnulbHlD8VYldR618NxRQRlKQFgQn0Gk,42
|
|
2
|
+
create_browser_app/main.py,sha256=8n6Mot1AAM5Vwd7YhzUjresboJtwnt-hwFo1_jBI98Q,4864
|
|
3
|
+
create_browser_app/template_fetcher.py,sha256=iu1hhs9RDZJrwpSwdyGJRaGwboMcfkLmzh5PecnYH_U,2690
|
|
4
|
+
create_browser_app/templates.py,sha256=ipfp4zmfbD4-vhoggEW9M_EBXYvvyCzvmHew9tTgi7w,2636
|
|
5
|
+
create_browser_app-0.1.12.dist-info/METADATA,sha256=U_lzsuZJnDfMe-PpL7Lrks0VyrVwa0ri7c2fVuMA7s0,649
|
|
6
|
+
create_browser_app-0.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
create_browser_app-0.1.12.dist-info/entry_points.txt,sha256=yyAKhFZs2kraGA_ixwnRZeStL0uxWvBCMzysg8S-0VE,68
|
|
8
|
+
create_browser_app-0.1.12.dist-info/top_level.txt,sha256=sLW8imVtlXvOy1D5aGPBDxbMP3Yvonif7VxcLu_Izy4,19
|
|
9
|
+
create_browser_app-0.1.12.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
create_browser_app/__init__.py,sha256=izlkaSvrxNqPnulbHlD8VYldR618NxRQRlKQFgQn0Gk,42
|
|
2
|
-
create_browser_app/main.py,sha256=8n6Mot1AAM5Vwd7YhzUjresboJtwnt-hwFo1_jBI98Q,4864
|
|
3
|
-
create_browser_app/template_fetcher.py,sha256=C-kTM5jkFLJP6RZ6jN_PCMq2qNMV7LMHQRJVRaZ0BPU,2573
|
|
4
|
-
create_browser_app/templates.py,sha256=ipfp4zmfbD4-vhoggEW9M_EBXYvvyCzvmHew9tTgi7w,2636
|
|
5
|
-
create_browser_app-0.1.10.dist-info/METADATA,sha256=_NsCkN03menY-3WNQmnYoeAAkXECfdlwyRZeWoQJIak,649
|
|
6
|
-
create_browser_app-0.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
create_browser_app-0.1.10.dist-info/entry_points.txt,sha256=yyAKhFZs2kraGA_ixwnRZeStL0uxWvBCMzysg8S-0VE,68
|
|
8
|
-
create_browser_app-0.1.10.dist-info/top_level.txt,sha256=sLW8imVtlXvOy1D5aGPBDxbMP3Yvonif7VxcLu_Izy4,19
|
|
9
|
-
create_browser_app-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
{create_browser_app-0.1.10.dist-info → create_browser_app-0.1.12.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|