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

Overview

Chaleno

A flutter package to webscraping data from websites

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

Usage

Webscraping any data from website, this package give you this power from the easely way

Instance Chaleno classe

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

It return a Parser witch one we will use to get any data

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 intance Chaleno class, you can easily take 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 go map them. You can find most popular methods and attributs in table bellow

Example

var parser = await Chaleno().load('https://filipedeschamps.com.br/newsletter');

header = parser.getElementsByClassName('title')[0].text;
subscribeCount = parser.querySelector('.subscribers-count-note').text;
image = parser.querySelector('.jsx-1373700303 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
You might also like...

Log snapshot management solution (iOS/Android/Web/Server) built with Flutter/Dart using Bloc pattern and Firebase Firestore backend.

Log snapshot management solution (iOS/Android/Web/Server) built with Flutter/Dart using Bloc pattern and Firebase Firestore backend.

Log snapshot management solution (iOS/Android/Web/Server) built with Flutter/Dart using Bloc pattern and Firebase Firestore backend.

Nov 9, 2022

Reflectable is a Dart library that allows programmers to eliminate certain usages of dynamic reflection by specialization of reflective code to an equivalent implementation using only static techniques

Reflectable is a Dart library that allows programmers to eliminate certain usages of dynamic reflection by specialization of reflective code to an equivalent implementation using only static techniques. The use of dynamic reflection is constrained in order to ensure that the specialized code can be generated and will have a reasonable size.

Dec 31, 2022

The Dart Time Machine is a date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.

The Dart Time Machine is a date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.

The Dart Time Machine is a date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.

Oct 8, 2021

generate massive amounts of fake data in dart and flutter

generate massive amounts of fake data in Dart & Flutter Faker.dart is a dart port of the famous faker.js package for the web and NodeJS 🔨 Usage faker

Nov 28, 2022

A tool to easily install the Android SDK command-line and platform tools.

gibadb A tool to easily install the Android SDK command-line and platform tools. For developers: This README describes the CLI tool that ships with th

Sep 22, 2022

This is a simple class to package up and send requests to the Kroki.io web service.

Kroki.dart This is a simple class to package up and send requests to the Kroki.io web service. A live editor to editing diagrams that Kroki supports c

Jun 8, 2022

A library for Dart that generates fake data

faker A library for Dart that generates fake data. faker is heavily inspired by the Python package faker, and the Ruby package ffaker. Usage A simple

Dec 18, 2022

Destiny is a new, mock-data generator for Dart/Flutter

Destiny is a new, mock-data generator for Dart/Flutter. It uses static methods couched in a destiny namespace as the API.

Sep 16, 2022

A flutter utility to easily create flavors in your flutter application

Flutter Flavorizr A flutter utility to easily create flavors in your flutter application Getting Started Let's start by setting up our environment in

Jan 1, 2023
Comments
  • How do I delay before showing the screen?

    How do I delay before showing the screen?

    A site address is displayed, but when data is being loaded, ‘Please wait for a moment’ is displayed, and when the data is loaded, the data is displayed. However, if you use 'await' to scrap, 'Please wait' is displayed. How do I set the delay?

    opened by SungJun9212 0
  • Chaleno [ Exception ]: XMLHttpRequest error.

    Chaleno [ Exception ]: XMLHttpRequest error.

    @antonio-nicolau ... I just started trying your webscraper out. It looks like exactly what I want. however, this is what I put in and the error I got ... Any ideas?

    class _HomePageState extends State<HomePage> {
      String? header, subscribeCount, img;
    
      void scrapData() async {
        print('11111');
        var parser = await Chaleno().load('https://example.com');
        print('2222');
        Result result = parser!.getElementById('id');
        print(result.text);
    

    And I got these messages

    11111 Chaleno [ Exception ]: XMLHttpRequest error. 2222 null

    opened by jeff9315 0
  • Get Element by Id not defined following examples in the readme

    Get Element by Id not defined following examples in the readme

    Using the examples given in the read me file am getting this error

    The method 'getElementById' isn't defined for the type 'Future'. Try correcting the name to the name of an existing method, or defining a method named 'getElementById'

    opened by Genialngash 1
Owner
António Nicolau
I am a programmer computer, I am in love with this and I am using that to transform lives
António Nicolau
The diozz package helps you to deal with APIs easily and speed up the process of writing code.

Diozz The diozz package helps you to deal with APIs easily and speed up the process of writing code. Installation Diozz Use that command in the termin

Mohamed Abu.elezz 4 Nov 13, 2022
null 2 Apr 17, 2022
A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Muhammad Hamza 20 Jun 7, 2022
Easily swap Flutter web renderers at runtime

renderer_switcher Swap Web Renderers in a Flutter Web app at runtime. Installation To use this plugin, add renderer_switcher as a dependency in your p

Wilson Wilson 12 Oct 21, 2022
Volt is a wrapper over the Revolt API for easily writing bots using the Dart language.

Volt is a wrapper over the Revolt API for easily writing bots using the Dart language. It is currently in active development so not all of the functionality has yet been implemented.

null 8 Dec 13, 2022
Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data

Open source SDK to quickly integrate subscriptions, stop worring about code maintenance, and getting advanced real-time data. Javascript / iOS glue framework

glassfy 8 Oct 31, 2022
A dart package for decode and encode emv QR code

A dart package for decode and encode emv QR code

Laoitdev Open 4 Nov 15, 2022
VS Code `.code-workspace` file generator

VS Code .code-workspace file generator (for monorepositories with Dart and Flutter projects) TL;DR; Create yaml file config.yaml (check #Format sectio

Mike T 1 Feb 18, 2022
Generate random data(string, integer, IPs etc...) using Dart.

Generate random data using Features API provides generation of: Integers in any range of numbers Strings with various characters and length Colors rep

Dinko Pehar 14 Apr 17, 2022
The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. There is no way to get the package version from the code in the Dart ecosystem. Installation Add bu

Daichi Furiya 12 Dec 14, 2022