looter 1.1.0 copy "looter: ^1.1.0" to clipboard
looter: ^1.1.0 copied to clipboard

unlistedoutdated

A simple yet fully-featured web scraper for both static and dynamically generated web pages.

example/looter_example.dart

import 'package:looter/looter.dart';

void main() async {
  //1. Initialize the Looter
  // and specify wheather you are going to use a static or dynamic crawler.
  // the first time you use a dynamic crawler it will take some time to download the chrome binaries, please be patient.
  // for more info see "https://pub.dev/packages/puppeteer".
  Looter looter =
      await Looter.initialize(crawlingMethod: CrawlingMethod.dynamicCrawler);
  //
  //2. Start Looting!
  List<Map<String, dynamic>> result =
      await looter.from("http://books.toscrape.com").loop(
    'ol.row li', // give the looper the shared parents selector..
    {
      'article.product_pod h3 a': {"bookTitle": 'text'},
      'div.image_container img': {"bookImage": 'src'},
      'div.product_price p.price_color': {'bookPrice': 'text'},
      'div.product_price instock availability': {'bookAvailability': 'text'},
    },
  );
}
4
likes
0
points
40
downloads

Publisher

verified publishermicazi.dev

Weekly Downloads

A simple yet fully-featured web scraper for both static and dynamically generated web pages.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, html, http, puppeteer

More

Packages that depend on looter