Skip to content

Commit c29bc3f

Browse files
fix: missed base_url for ai_scrape url.
1 parent e446283 commit c29bc3f

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

jigsawstack/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.3.8"
1+
__version__ = "0.3.9"
22

33

44
def get_version() -> str:

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="jigsawstack",
9-
version="0.3.8",
9+
version="0.3.9",
1010
description="JigsawStack - The AI SDK for Python",
1111
long_description=open("README.md", encoding="utf8").read(),
1212
long_description_content_type="text/markdown",
@@ -16,7 +16,7 @@
1616
packages=find_packages(include=["jigsawstack"]),
1717
install_requires=install_requires,
1818
zip_safe=False,
19-
python_requires=">=3.7",
19+
python_requires=">=3.9",
2020
keywords=["AI", "AI Tooling"],
2121
setup_requires=["pytest-runner"],
2222
tests_require=["pytest", "pytest-asyncio"],
@@ -27,10 +27,9 @@
2727
"License :: OSI Approved :: MIT License",
2828
"Natural Language :: English",
2929
"Operating System :: OS Independent",
30-
"Programming Language :: Python :: 3.7",
31-
"Programming Language :: Python :: 3.8",
3230
"Programming Language :: Python :: 3.9",
3331
"Programming Language :: Python :: 3.10",
3432
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
3534
],
3635
)

tests/test_ai_scrape.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@
1212
logging.basicConfig(level=logging.INFO)
1313
logger = logging.getLogger(__name__)
1414

15-
jigsaw = jigsawstack.JigsawStack(api_key=os.getenv("JIGSAWSTACK_API_KEY"))
16-
async_jigsaw = jigsawstack.AsyncJigsawStack(api_key=os.getenv("JIGSAWSTACK_API_KEY"))
15+
jigsaw = jigsawstack.JigsawStack(
16+
base_url=os.getenv("JIGSAWSTACK_BASE_URL") + "/api"
17+
if os.getenv("JIGSAWSTACK_BASE_URL")
18+
else "https://api.jigsawstack.com",
19+
api_key=os.getenv("JIGSAWSTACK_API_KEY"),
20+
headers={"x-jigsaw-skip-cache": "true"},
21+
)
22+
async_jigsaw = jigsawstack.AsyncJigsawStack(
23+
base_url=os.getenv("JIGSAWSTACK_BASE_URL") + "/api"
24+
if os.getenv("JIGSAWSTACK_BASE_URL")
25+
else "https://api.jigsawstack.com",
26+
api_key=os.getenv("JIGSAWSTACK_API_KEY"),
27+
headers={"x-jigsaw-skip-cache": "true"},
28+
)
1729

1830
URL = "https://jigsawstack.com"
1931

@@ -70,7 +82,9 @@
7082
"params": {
7183
"url": URL,
7284
"element_prompts": ["user data"],
73-
"cookies": [{"name": "session", "value": "test123", "domain": "example.com"}],
85+
"cookies": [
86+
{"name": "session", "value": "test123", "domain": "example.com"}
87+
],
7488
},
7589
},
7690
{

0 commit comments

Comments
 (0)