dart_web_scraper 0.1.6 copy "dart_web_scraper: ^0.1.6" to clipboard
dart_web_scraper: ^0.1.6 copied to clipboard

Config-based, reusable web scraper for web and API scraping. Scrape, parse web pages or APIs without writing parsers or scraping logic, using simple key/value based configs.

example/example.dart

import 'dart:convert';

import 'package:dart_web_scraper/dart_web_scraper.dart';
import 'configs.dart';

void main() async {
  /// Initialize WebScraper
  WebScraper webScraper = WebScraper();

  /// Scrape website based on configMap
  Map<String, Object> result = await webScraper.scrape(
    url: Uri.parse("https://quotes.toscrape.com"),
    configMap: configMap,
    configIndex: 0,
    cookies: {
      "foo": "bar",
    },
    userAgent: "DartWebScraper/0.1",
    debug: true,
    concurrentParsing: false,
    // proxyAPI: Uri.parse("https://api.exampleproxy.com/scrape?key=API_KEY"),
    // proxyUrlParam: "url", // The query parameter name for the URL to scrape
  );

  print(jsonEncode(result));
}
19
likes
0
points
496
downloads

Publisher

verified publishersukhcha.in

Weekly Downloads

Config-based, reusable web scraper for web and API scraping. Scrape, parse web pages or APIs without writing parsers or scraping logic, using simple key/value based configs.

Repository (GitHub)
View/report issues

Topics

#scraping #scraper #scrape

License

unknown (license)

Dependencies

html, http, json5, json_path, path

More

Packages that depend on dart_web_scraper