diff --git a/tests/test_ecommerce.py b/tests/test_ecommerce.py index 24305d9..2a786ce 100644 --- a/tests/test_ecommerce.py +++ b/tests/test_ecommerce.py @@ -372,11 +372,7 @@ def test_metadata(): {"type": "null"}, ], "default": None, - "description": ( - "ISO 3166-1 alpha-2 2-character string specified in " - "https://docs.zyte.com/zyte-api/usage/reference.html" - "#operation/extract/request/geolocation." - ), + "description": ("Country of the IP addresses to use."), "enumMeta": { code: { "title": GEOLOCATION_OPTIONS_WITH_CODE[code], diff --git a/tests/test_serp.py b/tests/test_serp.py index 5c5999e..0846dd2 100644 --- a/tests/test_serp.py +++ b/tests/test_serp.py @@ -316,18 +316,14 @@ def test_metadata(): {"type": "null"}, ], "default": None, - "description": ( - "ISO 3166-1 alpha-2 2-character string specified in " - "https://docs.zyte.com/zyte-api/usage/reference.html" - "#operation/extract/request/geolocation." - ), + "description": ("Country of the IP addresses to use."), "enumMeta": { code: { "title": GEOLOCATION_OPTIONS_WITH_CODE[code], } for code in sorted(Geolocation) }, - "title": "Geolocation (IP address)", + "title": "Geolocation (IP addresses)", "enum": list( sorted(GEOLOCATION_OPTIONS, key=GEOLOCATION_OPTIONS.__getitem__) ), diff --git a/zyte_spider_templates/params.py b/zyte_spider_templates/params.py index e74f3f8..a9964e3 100644 --- a/zyte_spider_templates/params.py +++ b/zyte_spider_templates/params.py @@ -78,8 +78,7 @@ class ExtractFromParam(BaseModel): class GeolocationParam(BaseModel): geolocation: Optional[Geolocation] = Field( title="Geolocation", - description="ISO 3166-1 alpha-2 2-character string specified in " - "https://docs.zyte.com/zyte-api/usage/reference.html#operation/extract/request/geolocation.", + description="Country of the IP addresses to use.", default=None, json_schema_extra={ "enumMeta": { diff --git a/zyte_spider_templates/spiders/serp.py b/zyte_spider_templates/spiders/serp.py index 25b69d2..5e622d5 100644 --- a/zyte_spider_templates/spiders/serp.py +++ b/zyte_spider_templates/spiders/serp.py @@ -47,9 +47,8 @@ class SerpGeolocationParam(BaseModel): geolocation: Optional[Geolocation] = Field( # The title, worded like this for contrast with gl, is the reason why # ..params.GeolocationParam is not used. - title="Geolocation (IP address)", - description="ISO 3166-1 alpha-2 2-character string specified in " - "https://docs.zyte.com/zyte-api/usage/reference.html#operation/extract/request/geolocation.", + title="Geolocation (IP addresses)", + description="Country of the IP addresses to use.", default=None, json_schema_extra={ "enumMeta": {