From 69e2b8a0afc595b9da680a1c76f2b0dc581f709d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 21:02:23 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- src/context/dev/resources/web.py | 10 ++++++++++ src/context/dev/types/web_web_scrape_html_params.py | 6 ++++++ tests/api_resources/test_web.py | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 74f2330..793d9bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d605be55fd51d8f3ae53439a3bbcdcd20c4c78e3d9dcec9bf0bbf326290f0dd5.yml -openapi_spec_hash: 2f6a14c5ab9716e73da8e1c03df8cab6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5a8e1f6e16ecdbab4b2ff14701779818fe0328b06a1c7fa44a32da4f4bc87a49.yml +openapi_spec_hash: 4b5407859d1154232189ef440b783b17 config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c diff --git a/src/context/dev/resources/web.py b/src/context/dev/resources/web.py index 2dbd25e..92790f0 100644 --- a/src/context/dev/resources/web.py +++ b/src/context/dev/resources/web.py @@ -633,6 +633,7 @@ def web_scrape_html( max_age_ms: int | Omit = omit, pdf: web_web_scrape_html_params.Pdf | Omit = omit, timeout_ms: int | Omit = omit, + use_main_content_only: bool | Omit = omit, wait_for_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -672,6 +673,9 @@ def web_scrape_html( than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). + use_main_content_only: When true, return only the page's main content in the HTML response, excluding + headers, footers, sidebars, and navigation when detectable. + wait_for_ms: Optional browser wait time in milliseconds after initial page load. Min: 0. Max: 30000 (30 seconds). @@ -701,6 +705,7 @@ def web_scrape_html( "max_age_ms": max_age_ms, "pdf": pdf, "timeout_ms": timeout_ms, + "use_main_content_only": use_main_content_only, "wait_for_ms": wait_for_ms, }, web_web_scrape_html_params.WebWebScrapeHTMLParams, @@ -1537,6 +1542,7 @@ async def web_scrape_html( max_age_ms: int | Omit = omit, pdf: web_web_scrape_html_params.Pdf | Omit = omit, timeout_ms: int | Omit = omit, + use_main_content_only: bool | Omit = omit, wait_for_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -1576,6 +1582,9 @@ async def web_scrape_html( than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). + use_main_content_only: When true, return only the page's main content in the HTML response, excluding + headers, footers, sidebars, and navigation when detectable. + wait_for_ms: Optional browser wait time in milliseconds after initial page load. Min: 0. Max: 30000 (30 seconds). @@ -1605,6 +1614,7 @@ async def web_scrape_html( "max_age_ms": max_age_ms, "pdf": pdf, "timeout_ms": timeout_ms, + "use_main_content_only": use_main_content_only, "wait_for_ms": wait_for_ms, }, web_web_scrape_html_params.WebWebScrapeHTMLParams, diff --git a/src/context/dev/types/web_web_scrape_html_params.py b/src/context/dev/types/web_web_scrape_html_params.py index 0fd5301..9a61705 100644 --- a/src/context/dev/types/web_web_scrape_html_params.py +++ b/src/context/dev/types/web_web_scrape_html_params.py @@ -61,6 +61,12 @@ class WebWebScrapeHTMLParams(TypedDict, total=False): status code. Maximum allowed value is 300000ms (5 minutes). """ + use_main_content_only: Annotated[bool, PropertyInfo(alias="useMainContentOnly")] + """ + When true, return only the page's main content in the HTML response, excluding + headers, footers, sidebars, and navigation when detectable. + """ + wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")] """Optional browser wait time in milliseconds after initial page load. diff --git a/tests/api_resources/test_web.py b/tests/api_resources/test_web.py index 6b8b959..ce43b3e 100644 --- a/tests/api_resources/test_web.py +++ b/tests/api_resources/test_web.py @@ -426,6 +426,7 @@ def test_method_web_scrape_html_with_all_params(self, client: ContextDev) -> Non "start": 1, }, timeout_ms=1000, + use_main_content_only=True, wait_for_ms=0, ) assert_matches_type(WebWebScrapeHTMLResponse, web, path=["response"]) @@ -1015,6 +1016,7 @@ async def test_method_web_scrape_html_with_all_params(self, async_client: AsyncC "start": 1, }, timeout_ms=1000, + use_main_content_only=True, wait_for_ms=0, ) assert_matches_type(WebWebScrapeHTMLResponse, web, path=["response"]) From b4d606b4a9d4d99a1915655cf93ba00aac02d30c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 21:18:43 +0000 Subject: [PATCH 2/2] release: 0.34.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/context/dev/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 57dc0c3..e4e1c3c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.33.0" + ".": "0.34.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 13c487d..b975c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.34.0 (2026-06-08) + +Full Changelog: [v0.33.0...v0.34.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.33.0...v0.34.0) + +### Features + +* **api:** api update ([69e2b8a](https://github.com/context-dot-dev/context-python-sdk/commit/69e2b8a0afc595b9da680a1c76f2b0dc581f709d)) + ## 0.33.0 (2026-06-08) Full Changelog: [v0.32.0...v0.33.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.32.0...v0.33.0) diff --git a/pyproject.toml b/pyproject.toml index 63fa77c..c6d3576 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "context.dev" -version = "0.33.0" +version = "0.34.0" description = "The official Python library for the context.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/context/dev/_version.py b/src/context/dev/_version.py index f5a3e45..260a9df 100644 --- a/src/context/dev/_version.py +++ b/src/context/dev/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "context.dev" -__version__ = "0.33.0" # x-release-please-version +__version__ = "0.34.0" # x-release-please-version