Skip to content

Commit

Permalink
Merge pull request #73 from zytedata/serp-max-pages
Browse files Browse the repository at this point in the history
Restrict SERP Max Pages to >= 1.
  • Loading branch information
wRAR authored Oct 16, 2024
2 parents 9fe95a3 + 984cd7e commit 37fcbee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_serp.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def test_metadata():
"description": (
"Maximum number of result pages to visit per search query."
),
"minimum": 1,
"title": "Max Pages",
"type": "integer",
},
Expand Down
1 change: 1 addition & 0 deletions zyte_spider_templates/spiders/serp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class SerpMaxPagesParam(BaseModel):
max_pages: int = Field(
title="Max Pages",
description="Maximum number of result pages to visit per search query.",
ge=1,
default=1,
)

Expand Down

0 comments on commit 37fcbee

Please sign in to comment.