feat: support cleaning and transforms for all fields (#138)

This commit is contained in:
Adam Pash 2017-02-02 13:42:49 -08:00 committed by GitHub
parent 1054d854dd
commit 25d9642ff9

View File

@ -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