Skip to content

Commit a3eae4d

Browse files
committed
screenshot_config: send cache_ttl as plain int, not bool-formatted string
Follow-up to the previous commit: the field type was fixed but the to_api_params() body still ran cache_ttl through _bool_to_http(), which coerces to "True"/"False" strings. Pass the raw int instead.
1 parent 9db24f5 commit a3eae4d

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
@@ -155,9 +155,9 @@ def to_api_params(self, key:str) -> Dict:
155155

156156
if self.cache is not None:
157157
params['cache'] = self._bool_to_http(self.cache)
158-
158+
159159
if self.cache_ttl is not None:
160-
params['cache_ttl'] = self._bool_to_http(self.cache_ttl)
160+
params['cache_ttl'] = self.cache_ttl
161161

162162
if self.cache_clear is not None:
163163
params['cache_clear'] = self._bool_to_http(self.cache_clear)

0 commit comments

Comments
 (0)