From 04aa592b8492e9d34ac8c5bbee063c87744d6ef5 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Thu, 1 Feb 2024 18:31:12 +0400 Subject: [PATCH] Improve the URL field tooltip. --- tests/test_ecommerce.py | 5 ++++- zyte_spider_templates/spiders/base.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_ecommerce.py b/tests/test_ecommerce.py index 07d7c53..41edff9 100644 --- a/tests/test_ecommerce.py +++ b/tests/test_ecommerce.py @@ -434,7 +434,10 @@ def test_metadata(): "url": { "type": "string", "title": "URL", - "description": "Initial URL for the crawl.", + "description": ( + "Initial URL for the crawl. Enter the full URL including http(s), " + "you can copy and paste it from your browser. Example: https://toscrape.com/" + ), "pattern": r"^https?://[^:/\s]+(:\d{1,5})?(/[^\s]*)*(#[^\s]*)?$", }, }, diff --git a/zyte_spider_templates/spiders/base.py b/zyte_spider_templates/spiders/base.py index 04eda09..e64faa0 100644 --- a/zyte_spider_templates/spiders/base.py +++ b/zyte_spider_templates/spiders/base.py @@ -17,7 +17,8 @@ class BaseSpiderParams(BaseModel): url: str = Field( title="URL", - description="Initial URL for the crawl.", + description="Initial URL for the crawl. Enter the full URL including http(s), " + "you can copy and paste it from your browser. Example: https://toscrape.com/", pattern=r"^https?://[^:/\s]+(:\d{1,5})?(/[^\s]*)*(#[^\s]*)?$", ) geolocation: Optional[Geolocation] = Field(