Skip to content

Commit 0a68836

Browse files
feat(api): api update
1 parent d99a70e commit 0a68836

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-29a5e9392b60f02d4c19d457b92666bf54d49479670e719f36f23a5d3943f188.yml
3-
openapi_spec_hash: 8a9c44d740853834fb6d7174013c1984
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d4c568ebc1a0f853b02c55ba800c7d7b66189bc6dd22c3cb565a81361c832e2b.yml
3+
openapi_spec_hash: 9a0ecdc06874eee29a3a58a699923405
44
config_hash: 0fb0ceca5946298c416cec0cca5260c7

‎src/context/dev/resources/web.py‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,13 +1338,15 @@ def web_crawl_md(
13381338
than this value, it will be aborted with a 408 status code. Maximum allowed
13391339
value is 300000ms (5 minutes).
13401340
1341-
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped.
1341+
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped. An
1342+
automatic prefix scope in the form ^<starting URL> follows a redirect of the
1343+
starting page.
13421344
13431345
use_main_content_only: Extract only the main content, stripping headers, footers, sidebars, and
13441346
navigation
13451347
1346-
wait_for_ms: Optional browser wait time in milliseconds after initial page load for each
1347-
crawled page. Min: 0. Max: 30000 (30 seconds).
1348+
wait_for_ms: Browser wait time in milliseconds after initial page load for each crawled page.
1349+
Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).
13481350
13491351
zdr: Set to enabled to bypass shared caches and omit request and response content
13501352
from retained usage logs. Requires zero data retention to be enabled for your
@@ -3576,13 +3578,15 @@ async def web_crawl_md(
35763578
than this value, it will be aborted with a 408 status code. Maximum allowed
35773579
value is 300000ms (5 minutes).
35783580
3579-
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped.
3581+
url_regex: Regex pattern. Only URLs matching this pattern will be followed and scraped. An
3582+
automatic prefix scope in the form ^<starting URL> follows a redirect of the
3583+
starting page.
35803584
35813585
use_main_content_only: Extract only the main content, stripping headers, footers, sidebars, and
35823586
navigation
35833587
3584-
wait_for_ms: Optional browser wait time in milliseconds after initial page load for each
3585-
crawled page. Min: 0. Max: 30000 (30 seconds).
3588+
wait_for_ms: Browser wait time in milliseconds after initial page load for each crawled page.
3589+
Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).
35863590
35873591
zdr: Set to enabled to bypass shared caches and omit request and response content
35883592
from retained usage logs. Requires zero data retention to be enabled for your

‎src/context/dev/types/web_web_crawl_md_params.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,12 @@ class WebWebCrawlMdParams(TypedDict, total=False):
308308
"""
309309

310310
url_regex: Annotated[str, PropertyInfo(alias="urlRegex")]
311-
"""Regex pattern. Only URLs matching this pattern will be followed and scraped."""
311+
"""Regex pattern.
312+
313+
Only URLs matching this pattern will be followed and scraped. An automatic
314+
prefix scope in the form ^<starting URL> follows a redirect of the starting
315+
page.
316+
"""
312317

313318
use_main_content_only: Annotated[bool, PropertyInfo(alias="useMainContentOnly")]
314319
"""
@@ -317,9 +322,9 @@ class WebWebCrawlMdParams(TypedDict, total=False):
317322
"""
318323

319324
wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")]
320-
"""
321-
Optional browser wait time in milliseconds after initial page load for each
322-
crawled page. Min: 0. Max: 30000 (30 seconds).
325+
"""Browser wait time in milliseconds after initial page load for each crawled page.
326+
327+
Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).
323328
"""
324329

325330
zdr: Literal["enabled", "disabled"]

0 commit comments

Comments
 (0)