Search packages, repositories and app categories

Package detailsv0.0.8

chaleno

A package to web scraping data from websites easily and faster using less code lines.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
362
Likes
140
Pub points
140

Install package

flutter pub add chaleno

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Chaleno is a Flutter/Dart package designed to simplify web scraping by enabling developers to extract data from websites with minimal code. It streamlines the process of fetching and parsing HTML content across multiple platforms, including Android, iOS, Web, macOS, Windows, and Linux. Built for efficiency, Chaleno reduces boilerplate code typically required for HTTP requests and DOM manipulation, making it ideal for rapid data collection tasks. The package integrates seamlessly into Flutter projects and leverages Dart’s asynchronous capabilities for fast, reliable scraping operations.

Use cases

  • Extracting product details from e-commerce sites
  • Scraping news articles or blog posts
  • Gathering public data for analytics
  • Automating data collection from public web pages

Key features

  • Minimal code for web scraping
  • Cross-platform support
  • Built-in HTML parsing
  • Asynchronous request handling
  • Lightweight and fast
  • Easy integration with Flutter

Suitable for

  • Developers building data aggregation tools
  • Projects requiring frequent web data extraction
  • Prototyping scrapers quickly
  • Apps needing real-time public data

Considerations

  • Ensure compliance with website's terms of service
  • Rate limiting may be necessary to avoid blocking
  • Not suitable for sites with complex JavaScript rendering
  • May require additional parsing logic for dynamic content

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Chaleno

A flutter package for webscraping data from websites.

This package contains a set of high-level functions that make it easy to webscrap websites. It's multi-platform, supports mobile, desktop, and the web.

Usage

Scraping data from websites, this package gives you the power to scrape the web in an easy way.

Instance Chaleno class
var parser = await Chaleno().load('https://example.com');

It returns a Parser which we can use to start webscraping.

You can load HTML file from localhost.

var parser = await Chaleno().load('https://localhost/index');

var parser = await Chaleno().load('https://192.168.1.122/index');
Very simple to use

After instantiating Chaleno class, you can easily retrieve any data using few code lines

Result result = parser.getElementById('id');
print(result.text);

List<Result> results = parser.getElementsByClassName('className');
results.map((item) => print(item.text))

You can return a single result or a list of results and map them. You can find most popular methods and attributes in table below.

Example
final parser = await Chaleno().load('https://example.com');

final title = parser?.getElementById('title').text;
final contents = parser.querySelector('.content-card').text;
final image = parser.getElementsByTagName('img').src;

Importants Methods and propriets

Methods Mean
title Return the page title
getElementById Return a single element searching for ID on the page
getElementsByClassName Return a list of elements according class passed as parameter
getElementsByTagName Return a list of elements according tag passed as parameter
querySelector Return single element passing a list of selector
querySelectorAll Return a list of elements passing a list of selector
text Return text atribute from a tag returned
src Return src atribute from a tag returned
href Return href atribute from a tag returned

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package

No data available yet.