パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.8

chaleno

少ないコード行で、簡単に高速にウェブサイトからデータをスクレイピングするためのパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
362
いいね数
140
Pub ポイント
140

パッケージをインストール

flutter pub add chaleno

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Chaleno は、開発者が最小限のコードでウェブサイトからデータを抽出できるようにする、Flutter/Dart パッケージです。Android、iOS、Web、macOS、Windows、Linux など複数のプラットフォームで HTML コンテンツの取得と解析プロセスを簡素化します。効率性を重視して設計されており、HTTPリクエストやDOM操作に通常必要なボイラープレートコードを削減し、迅速なデータ収集タスクに最適です。このパッケージは Flutter プロジェクトにシームレスに統合でき、Dart の非同期機能を活用して高速かつ信頼性の高いスクレイピング操作を実現します。

用途

  • ECサイトから製品情報を抽出する
  • ニュース記事やブログ投稿のスクレイピング
  • 分析用のパブリックデータを収集する
  • 公開ウェブページからのデータ収集の自動化

主な機能

  • ウェブスクレイピングの最小コード
  • クロスプラットフォーム対応
  • 組み込みの HTML パース
  • 非同期リクエスト処理
  • 軽量で高速
  • Flutterとの簡単な統合

適している対象

  • データ集約ツールを開発する開発者
  • 頻繁なウェブデータ抽出を必要とするプロジェクト
  • 迅速なプロトタイピングスクラッパー
  • リアルタイムの公開データを必要とするアプリ

注意事項

  • ウェブサイトの利用規約に準拠していることを確認してください
  • ブロッキングを回避するために、レート制限が必要な場合があります
  • 複雑なJavaScriptレンダリングを必要とするサイトには適していません
  • 動的コンテンツ用に追加のパースロジックが必要になる可能性があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。