Skip to content

Commit

Permalink
Improve the URL field tooltip.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Feb 1, 2024
1 parent 674f8a7 commit 04aa592
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_ecommerce.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]*)?$",
},
},
Expand Down
3 changes: 2 additions & 1 deletion zyte_spider_templates/spiders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 04aa592

Please sign in to comment.