Skip to content

Commit 9db24f5

Browse files
committed
screenshot_config: cache_ttl is int (seconds), not bool
ScreenshotConfig declared cache_ttl as Optional[bool] in both the field annotation and the __init__ signature, but the scrape API requires an integer TTL. Sending anything other than an int raises ERR::SCRAPE::CONFIG_ERROR at the API layer. ScrapeConfig.cache_ttl is already typed as int; align the screenshot config to the same shape.
1 parent a34fc29 commit 9db24f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scrapfly/screenshot_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ScreenshotConfig(BaseApiConfig):
7171
auto_scroll: Optional[bool] = None
7272
js: Optional[str] = None
7373
cache: Optional[bool] = None
74-
cache_ttl: Optional[bool] = None
74+
cache_ttl: Optional[int] = None
7575
cache_clear: Optional[bool] = None
7676
webhook: Optional[str] = None
7777
raise_on_upstream_error: bool = True
@@ -90,7 +90,7 @@ def __init__(
9090
auto_scroll: Optional[bool] = None,
9191
js: Optional[str] = None,
9292
cache: Optional[bool] = None,
93-
cache_ttl: Optional[bool] = None,
93+
cache_ttl: Optional[int] = None,
9494
cache_clear: Optional[bool] = None,
9595
vision_deficiency: Optional[VisionDeficiency] = None,
9696
webhook: Optional[str] = None,

0 commit comments

Comments
 (0)