1
0
Fork 0

Clarify RegEx requirements (#1981)

This section of the doc made it seem like a URL object is required to use RegEx, but they work fine in just a string array.
This commit is contained in:
Jake Witz 2023-07-20 15:54:33 +01:00 committed by GitHub
parent 5ed9a6d5c8
commit 2aef60fcfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,9 +111,9 @@ If one `start_urls` item has no `selectors_key` defined, the `default` set will
### Using regular expressions
The `start_urls` and `stop_urls` options also enable you to use regular expressions to express more complex patterns. This object must at least contain a `url` key targeting a reachable page.
The `start_urls` and `stop_urls` options also enable you to use regular expressions to express more complex patterns. You can define either an array of regular expressions or an object. The object must at least contain a `url` key targeting a reachable page.
You can also define a `variables` key that will be injected into your specific URL pattern. The following example makes this variable feature clearer:
If you define your regular expression as an object, you can also define a `variables` key that will be injected into your specific URL pattern. The following example makes this variable feature clearer:
```json
{