From 00ca6701f63a8a0711fcdb1f127f33d9f576869c Mon Sep 17 00:00:00 2001 From: Maris Date: Wed, 23 Jul 2025 11:04:16 +0300 Subject: [PATCH 1/2] WS-8203 add multiple type documentation --- docs/Selectors/Element attribute selector.md | 16 ++++++++++++++-- docs/Selectors/Image selector.md | 16 ++++++++++++++-- docs/Selectors/Text selector.md | 20 +++++++++++++++++--- 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/docs/Selectors/Element attribute selector.md b/docs/Selectors/Element attribute selector.md index a82260c..26554a5 100644 --- a/docs/Selectors/Element attribute selector.md +++ b/docs/Selectors/Element attribute selector.md @@ -4,14 +4,26 @@ For example you could use this selector to extract title attribute from this link: `link`. ## Configuration options - * selector - [CSS selector] [css-selector] for the element. - * multiple - multiple records are being extracted. + * selector - [CSS selector] [css-selector] for the element. * multiple type - The way multiple extracted images should be handled. + * column count - the amount of columns returned when multiple type is set to + `Multiple Records in Multiple Columns` * attribute name - the attribute that is going to be extracted. For example `title`, `data-id`. ## Use cases See [Text selector] [text-selector] use cases. +### Multiple Type + +A specific selector can find multiple items on a single site. To handle this gracefully +a `Multiple Type` is available when creating the selector. The selected type affects +how data is returned. + +* `First Record Only` - returns only the first record extracted. Use when only one record expected +* `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count` + columns. Enables and Requires filling `Column count` (defaults to 5) +* `Multiple Records in One Column` - returns all extracted records in a single column joined by newline + ## Related videos * [How to extract data from element attribute] diff --git a/docs/Selectors/Image selector.md b/docs/Selectors/Image selector.md index 73fed3c..6fea3ea 100644 --- a/docs/Selectors/Image selector.md +++ b/docs/Selectors/Image selector.md @@ -7,8 +7,9 @@ report it as a bug. ## Configuration options * selector - [CSS selector] [css-selector] for the image element. - * multiple - multiple records are being extracted. Usually should not be - checked for Image selector. + * multiple type - The way multiple extracted images should be handled. + * column count - the amount of columns returned when multiple type is set to + `Multiple Records in Multiple Columns` ## Use cases See [Text selector] [text-selector] use cases. @@ -51,6 +52,17 @@ required in order for script to work. Images are renamed to ![Fig. 2: macOS image download][osx-image-download-script] +### Multiple Type + +A specific selector can find multiple items on a single site. To handle this gracefully +a `Multiple Type` is available when creating the selector. The selected type affects +how data is returned. + +* `First Record Only` - returns only the first record extracted. Use when only one image expected +* `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count` columns. + Enables and Requires filling `Column count` (defaults to 5) +* `Multiple Records in One Column` - returns all extracted records in a single column joined by newline + [text-selector]: Text%20selector.md [css-selector]: ../CSS%20selector.md [windows-image-download-script]: ../images/selectors/image/win-image-downloader.gif?raw=true diff --git a/docs/Selectors/Text selector.md b/docs/Selectors/Text selector.md index 2c30162..196da74 100644 --- a/docs/Selectors/Text selector.md +++ b/docs/Selectors/Text selector.md @@ -11,9 +11,11 @@ resulting data. * selector - [CSS selector] [css-selector] for the element from which data will be extracted. - * multiple - multiple records are being extracted. Usually should not be + * multiple type - multiple records are being extracted. Usually should not be checked. If you want to use multiple text selectors within one page with multiple checked then you might actually need + * column count - the amount of columns returned when multiple type is set to + `Multiple Records in Multiple Columns` [Element selector] [element-selector]. ## Use cases @@ -43,11 +45,23 @@ element. For example you want to extract comments for an article. There are multiple comments in a single page and you only need the comment text (If you would need other comment attributes then see the example above). You can use -*Text selector* to extract these comments. The *Text selectors* multiple -attribute should be checked because you will be extracting multiple records. +*Text selector* to extract these comments. The preferred *Text selectors* multiple type +should be selected to enable extracting multiple elements ![Fig. 3: Text selector selects multiple comments][text-selector-multiple-per-page] +### Multiple Type + +A specific selector can find multiple items on a single site. To handle this gracefully +a `Multiple Type` is available when creating the selector. The selected type affects +how data is returned. + +* `First Record Only` - returns only the first record extracted. Use when only one record expected +* `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count` + columns. Enables and Requires filling `Column count` (defaults to 5) +* `Multiple Records in One Column` - returns all extracted records in a single column joined by + 2 newlines (replaces mulitple newlines in extracted text with one) + ## Related videos * [How to scrape multiple items within a listings page] From ab0f39ced3cdd628f5f7c082aaa122e6e0fecd43 Mon Sep 17 00:00:00 2001 From: Maris Date: Wed, 23 Jul 2025 16:01:05 +0300 Subject: [PATCH 2/2] WS-8203 Fix wording for clarity in multiple type documentation across selectors --- docs/Selectors/Element attribute selector.md | 8 ++++---- docs/Selectors/Image selector.md | 8 ++++---- docs/Selectors/Text selector.md | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/Selectors/Element attribute selector.md b/docs/Selectors/Element attribute selector.md index 26554a5..02a9672 100644 --- a/docs/Selectors/Element attribute selector.md +++ b/docs/Selectors/Element attribute selector.md @@ -5,7 +5,7 @@ this link: `link`. ## Configuration options * selector - [CSS selector] [css-selector] for the element. * multiple type - The way multiple extracted images should be handled. - * column count - the amount of columns returned when multiple type is set to + * column count - the number of columns returned when multiple type is set to `Multiple Records in Multiple Columns` * attribute name - the attribute that is going to be extracted. For example `title`, `data-id`. @@ -15,9 +15,9 @@ See [Text selector] [text-selector] use cases. ### Multiple Type -A specific selector can find multiple items on a single site. To handle this gracefully -a `Multiple Type` is available when creating the selector. The selected type affects -how data is returned. +A specific selector can find multiple items on a single site. To handle this a `Multiple Type` +is available when creating the selector. The selected type affects +how data is returned * `First Record Only` - returns only the first record extracted. Use when only one record expected * `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count` diff --git a/docs/Selectors/Image selector.md b/docs/Selectors/Image selector.md index 6fea3ea..a7be647 100644 --- a/docs/Selectors/Image selector.md +++ b/docs/Selectors/Image selector.md @@ -8,7 +8,7 @@ report it as a bug. ## Configuration options * selector - [CSS selector] [css-selector] for the image element. * multiple type - The way multiple extracted images should be handled. - * column count - the amount of columns returned when multiple type is set to + * column count - the number of columns returned when multiple type is set to `Multiple Records in Multiple Columns` ## Use cases @@ -54,9 +54,9 @@ required in order for script to work. Images are renamed to ### Multiple Type -A specific selector can find multiple items on a single site. To handle this gracefully -a `Multiple Type` is available when creating the selector. The selected type affects -how data is returned. +A specific selector can find multiple items on a single site. To handle this a `Multiple Type` +is available when creating the selector. The selected type affects +how data is returned * `First Record Only` - returns only the first record extracted. Use when only one image expected * `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count` columns. diff --git a/docs/Selectors/Text selector.md b/docs/Selectors/Text selector.md index 196da74..e36e48f 100644 --- a/docs/Selectors/Text selector.md +++ b/docs/Selectors/Text selector.md @@ -14,7 +14,7 @@ resulting data. * multiple type - multiple records are being extracted. Usually should not be checked. If you want to use multiple text selectors within one page with multiple checked then you might actually need - * column count - the amount of columns returned when multiple type is set to + * column count - the number of columns returned when multiple type is set to `Multiple Records in Multiple Columns` [Element selector] [element-selector]. @@ -52,9 +52,9 @@ should be selected to enable extracting multiple elements ### Multiple Type -A specific selector can find multiple items on a single site. To handle this gracefully -a `Multiple Type` is available when creating the selector. The selected type affects -how data is returned. +A specific selector can find multiple items on a single site. To handle this a `Multiple Type` +is available when creating the selector. The selected type affects +how data is returned * `First Record Only` - returns only the first record extracted. Use when only one record expected * `Multiple Records in Multiple Columns` - returns multiple records split into up to `Column Count`