Skip to content

Commit 83d96d1

Browse files
author
stlc-bot
committed
feat(batches): let sitemap crawls choose which paths count as non-pages (#2796)
Stainless-Generated-From: 6cc6ef98459a02e9c8578225ccd921ea8292ffa6
1 parent 71fe1b7 commit 83d96d1

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,14 @@ class InputCrawlDataMarkdownSourceSitemapControls(TypedDict, total=False):
15301530
A sitemap batch scrapes exactly those URLs and never follows links off them, so there is no crawl depth here.
15311531
"""
15321532

1533+
exclude_paths: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludePaths")]
1534+
"""Path fragments that skip a sitemap URL in a crawl.
1535+
1536+
Works separately from any regex inclusion or exclusion you define. Defaults to
1537+
["/feed","/rss","/atom","/api/","/cdn-cgi/","/_next/","/__"]. Pass `[]` to keep
1538+
every listed URL.
1539+
"""
1540+
15331541
exclude_regex: Annotated[str, PropertyInfo(alias="excludeRegex")]
15341542
"""
15351543
Regex pattern; sitemap URLs matching it are not scraped, even when they match
@@ -1993,6 +2001,14 @@ class InputCrawlDataHTMLSourceSitemapControls(TypedDict, total=False):
19932001
A sitemap batch scrapes exactly those URLs and never follows links off them, so there is no crawl depth here.
19942002
"""
19952003

2004+
exclude_paths: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludePaths")]
2005+
"""Path fragments that skip a sitemap URL in a crawl.
2006+
2007+
Works separately from any regex inclusion or exclusion you define. Defaults to
2008+
["/feed","/rss","/atom","/api/","/cdn-cgi/","/_next/","/__"]. Pass `[]` to keep
2009+
every listed URL.
2010+
"""
2011+
19962012
exclude_regex: Annotated[str, PropertyInfo(alias="excludeRegex")]
19972013
"""
19982014
Regex pattern; sitemap URLs matching it are not scraped, even when they match
@@ -2468,6 +2484,14 @@ class InputCrawlDataBatchUnifiedCrawlDataSourceSitemapControls(TypedDict, total=
24682484
A sitemap batch scrapes exactly those URLs and never follows links off them, so there is no crawl depth here.
24692485
"""
24702486

2487+
exclude_paths: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludePaths")]
2488+
"""Path fragments that skip a sitemap URL in a crawl.
2489+
2490+
Works separately from any regex inclusion or exclusion you define. Defaults to
2491+
["/feed","/rss","/atom","/api/","/cdn-cgi/","/_next/","/__"]. Pass `[]` to keep
2492+
every listed URL.
2493+
"""
2494+
24712495
exclude_regex: Annotated[str, PropertyInfo(alias="excludeRegex")]
24722496
"""
24732497
Regex pattern; sitemap URLs matching it are not scraped, even when they match

0 commit comments

Comments
 (0)