Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions docs/Selectors/Element attribute selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ For example you could use this selector to extract title attribute from
this link: `<a href="#" title="my title">link<a>`.

## 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 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`.

## 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 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]
Expand Down
16 changes: 14 additions & 2 deletions docs/Selectors/Image selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 number of columns returned when multiple type is set to
`Multiple Records in Multiple Columns`

## Use cases
See [Text selector] [text-selector] use cases.
Expand Down Expand Up @@ -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 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
Expand Down
20 changes: 17 additions & 3 deletions docs/Selectors/Text selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 number of columns returned when multiple type is set to
`Multiple Records in Multiple Columns`
[Element selector] [element-selector].

## Use cases
Expand Down Expand Up @@ -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 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]
Expand Down
Loading