extractData method

List<String> extractData({
  1. required String html,
  2. required String selector,
  3. String? attribute,
  4. bool asText = true,
})

Extracts data from HTML content using CSS selectors

html is the HTML content to parse selector is the CSS selector to use attribute is the attribute to extract (optional) asText whether to extract the text content (default: true)

Implementation

List<String> extractData({
  required String html,
  required String selector,
  String? attribute,
  bool asText = true,
}) {
  return _scraper.extractData(
    html: html,
    selector: selector,
    attribute: attribute,
    asText: asText,
  );
}