Skip to content
pubscout

beautiful_soup_dart

0.3.0, released 4 years ago by an unverified publisher

Dart native HTML tree navigation, searching, and modification library inspired by Python's BeautifulSoup.

WASM-ready
$ flutter pub add beautiful_soup_dart
Source repository

What it does

Parses HTML documents and fragments into a tree structure. Provides methods to navigate, search via tags, attributes, and custom CSS selectors, and modify the HTML tree.

AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to parse, search, and navigate HTML trees in Dart.
  • You want an API inspired by Python's BeautifulSoup library.

Skip it when

  • You are looking for a complete web browser engine or heavy web scraping framework.

Strengths

  • Easy navigation and searching of HTML elements.
  • Supports modifying the HTML tree and attributes.

Weaknesses

  • Limited to HTML parsing and tree manipulation.
  • Some methods from BeautifulSoup are not yet implemented.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:beautiful_soup_dart/beautiful_soup.dart';

BeautifulSoup bs = BeautifulSoup(html_doc_string);
bs.find('p', class_: 'story');

Alternatives

Packages that do the same job and could replace beautiful_soup_dart.

  • xml

    If you need to parse and process XML data structures instead of HTML.

Works with

Packages commonly used together with beautiful_soup_dart: ones it builds on, ones built on it, and its own family.