qmetrics.net

floki

Elixir HTML parser with CSS selector queries

floki screenshot

Floki parses HTML and finds nodes using CSS selectors. Elixir code can parse documents or fragments, query trees, read attributes and text, and serialize nodes back to HTML.

Overview

Floki is an Elixir library for parsing HTML and locating elements with CSS selectors. Parsed documents and fragments become trees of tuples tagged with element names, attribute lists, and child nodes, including text nodes wrapped in lists as documented in the API.

Typical usage parses a document or fragment, runs selector queries such as class or ID filters, extracts attributes or inner text, and can render a node tree back to HTML. The selector support spans element types, attribute matchers, structural combinators, positional pseudo-classes, state pseudo-classes like checked and disabled, :has and :not with simple-selector limits, and Floki-specific text containment selectors.

By default Floki relies on a patched mochiweb_html parser bundled for easy installation. Optional backends include html5ever via Rustler precompiled NIFs and fasthtml built on lexbor when those dependencies are configured in the application.

The library integrates into Mix projects as a dependency and can be loaded in scripts through Mix.install. It may emit debug or info logs around selector or tree parsing unless logger compile-time purge options are set in application configuration.

Key features

  • CSS selector queries
  • Document and fragment parsing
  • Attribute and text extraction
  • HTML serialization from nodes
  • Optional html5ever backend
  • Optional fasthtml backend
  • Floki-specific text selectors
  • Mix and Livebook installation

Use cases

  • Scraping and HTML extraction in Elixir
  • Testing and parsing web snippets
  • Feed and markup transformation pipelines
  • Selector-based DOM traversal
  • Fragment cleanup and rewriting

Tags

Similar software

Firecrawl

Web scrape crawl and search infrastructure for AI agents

Firecrawl turns websites into LLM-ready markdown and structured data via API, CLI, and MCP. It supports scrape, crawl, map, batch jobs, optional cloud scale, and self-hosted server deployment.

★ 211.5k⟳ todayAGPL-3.0
Open Source Alternative to:TavilyZyte

Sherlock Project

Username search across many social networks

Sherlock checks a username against hundreds of social sites and writes matches to per-user text files. It runs from the command line, with Docker and community packages on several Linux distributions.

★ 118.5k⟳ 26 days agoMIT

Agent Reach

CLI toolkit for AI agents to search and read many web platforms

Agent Reach installs platform connectors so AI agents can search and read sites such as GitHub, YouTube, Reddit, Bilibili, and Xiaohongshu from one command line, without relying on paid APIs for default channels.

★ 115.3k⟳ 3 days agoMIT

Scrapling

Python framework for fetching and crawling the web

Scrapling combines HTTP and browser fetchers, parsing, concurrent spiders, exports, and an MCP server for AI agents. It targets static pages, JavaScript sites, stealthy sessions, and full-site crawls from one library.

★ 106.3k⟳ 3 days agoBSD-3-Clause

Puppeteer

JavaScript library for automating Chrome and Firefox

Puppeteer exposes a high-level JavaScript API to drive Chrome or Firefox through the DevTools Protocol or WebDriver BiDi. It defaults to headless browser control for scripts and tests.

★ 95.9k⟳ yesterdayApache-2.0

PaddleOCR

OCR toolkit for documents and scene text

PaddleOCR parses PDFs and images into structured Markdown or JSON with multilingual text and layout models.

★ 93.4k⟳ 2 months agoApache-2.0