패키지, 저장소 및 앱 카테고리 검색

패키지 상세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의 비동기 기능을 활용해 빠르고 신뢰성 있는 크롤링 작업을 수행할 수 있습니다.

사용 사례

  • 전자상거래 사이트에서 제품 세부 정보 추출
  • 뉴스 기사 또는 블로그 게시물 스크래핑
  • 분석을 위한 공공 데이터 수집
  • 공개 웹 페이지에서 데이터 수집 자동화

주요 기능

  • 웹 스크래핑을 위한 최소 코드
  • 크로스 플랫폼 지원
  • 내장된 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.