create-browser-app 0.1.9__tar.gz → 0.1.11__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: create-browser-app
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: Start your Stagehand project with a single command
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python3
2
- import urllib.request
2
+ import requests
3
3
  from typing import Dict, List, Optional
4
4
  from dataclasses import dataclass
5
5
 
@@ -19,27 +19,27 @@ GITHUB_TEMPLATES: List[TemplateInfo] = [
19
19
  ),
20
20
  TemplateInfo(
21
21
  name="form-filling",
22
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/form-filling/index.py",
22
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/form-filling/main.py",
23
23
  ),
24
24
  TemplateInfo(
25
25
  name="gift-finder",
26
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/gift-finder/index.py",
26
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/gift-finder/main.py",
27
27
  ),
28
28
  TemplateInfo(
29
29
  name="pickleball",
30
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/pickleball/index.py",
30
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/pickleball/main.py",
31
31
  ),
32
32
  TemplateInfo(
33
33
  name="license-verification",
34
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/license-verification/index.py",
34
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/license-verification/main.py",
35
35
  ),
36
36
  TemplateInfo(
37
37
  name="context",
38
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/context/index.py",
38
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/context/main.py",
39
39
  ),
40
40
  TemplateInfo(
41
41
  name="proxies",
42
- url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/proxies/index.py",
42
+ url="https://raw.githubusercontent.com/browserbase/templates/refs/heads/dev/python/proxies/main.py",
43
43
  ),
44
44
  ]
45
45
 
@@ -53,13 +53,14 @@ def get_template_by_name(name: str) -> Optional[TemplateInfo]:
53
53
  def fetch_template_content(template: TemplateInfo) -> Optional[str]:
54
54
  """Fetch the content of a specific template from GitHub."""
55
55
  try:
56
- req = urllib.request.Request(template.url)
57
- req.add_header("User-Agent", "create-browser-app-py")
58
-
59
- with urllib.request.urlopen(req) as response:
60
- if response.status != 200:
61
- return None
62
- return response.read().decode("utf-8")
56
+ response = requests.get(
57
+ template.url,
58
+ headers={"User-Agent": "create-browser-app-py"},
59
+ timeout=10
60
+ )
61
+ if response.status_code != 200:
62
+ return None
63
+ return response.text
63
64
  except Exception:
64
65
  return None
65
66
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: create-browser-app
3
- Version: 0.1.9
3
+ Version: 0.1.11
4
4
  Summary: Start your Stagehand project with a single command
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "create-browser-app"
7
- version = "0.1.9"
7
+ version = "0.1.11"
8
8
  description = "Start your Stagehand project with a single command"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"