mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
feat: validate web.crawl start URLs
This commit is contained in:
parent
797dd2df47
commit
a123c95703
2 changed files with 8 additions and 1 deletions
|
|
@ -18,6 +18,8 @@ from typing import Literal
|
|||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.capabilities.core.validation import HttpUrlStr
|
||||
|
||||
MAX_START_URLS = 20
|
||||
"""Per-call cap on seed URLs: bounds a synchronous request's fan-out (05)."""
|
||||
|
||||
|
|
@ -29,7 +31,7 @@ MAX_CRAWL_PAGES = 200
|
|||
|
||||
|
||||
class CrawlInput(BaseModel):
|
||||
startUrls: list[str] = Field(
|
||||
startUrls: list[HttpUrlStr] = Field(
|
||||
min_length=1,
|
||||
max_length=MAX_START_URLS,
|
||||
description=(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue