extract method

  1. @override
List extract(
  1. dynamic input
)
override

Process input and extract necessary data.

  • Note: the output is usually passed to the next extractor in the chain.

Implementation

@override
List extract(dynamic input) {
  final matchingElement = HtmlUtils.selectMatchingElements(
    HtmlUtils.formatInputElement(input),
    selector,
    maxCount,
  );

  return matchingElement.where((element) {
    return HtmlUtils.selectMatchingElements(
      element,
      containSelector,
      1,
    ).isNotEmpty;
  }).toList();
}