Skip to content

Commit

Permalink
feat: support cleaning and transforms for all fields (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
adampash authored Feb 2, 2017
1 parent 1054d85 commit 25d9642
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/extractors/root-extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ export function select(opts) {
const [selector, attr] = matchingSelector;
result = $(selector).attr(attr).trim();
} else {
result = $(matchingSelector).text().trim();
let $node = $(matchingSelector);

$node = cleanBySelectors($node, $, extractionOpts);
$node = transformElements($node, $, extractionOpts);

result = $node.text().trim();
}

// Allow custom extractor to skip default cleaner
Expand Down

0 comments on commit 25d9642

Please sign in to comment.