qmetrics.net

pyquery

jQuery-style DOM querying and manipulation for Python

pyquery screenshot

pyquery runs jQuery-like selectors over HTML or XML using lxml, loading documents from strings, files, or URLs.

Overview

pyquery brings a jQuery-flavored API to Python for searching and changing HTML or XML trees. It relies on lxml for parsing and manipulation, and is meant for server-side or script use rather than driving browser JavaScript.

The PyQuery wrapper can be built from markup strings, existing lxml elements, local files, or remote URLs, optionally with a custom opener for fetching pages. Once loaded, CSS selectors pick nodes, and methods mirror familiar jQuery calls to read or rewrite HTML and text content.

Support includes nonstandard pseudo-classes such as :first, :last, :even, :odd, :eq, and form-related selectors like :checked. Documentation covers attributes, traversal, CSS tweaks, scraping tips, and testing guidance, with further selector semantics aligned to jQuery references.

Teams adopt pyquery when they want concise DOM queries in Python pipelines—especially for scraping, templating tweaks, or test fixtures—without adopting a full browser automation stack.

Key features

  • jQuery-like selector and manipulation API
  • lxml-backed HTML and XML parsing
  • Load from string, file, or URL
  • Pseudo-class selectors beyond CSS
  • HTML and text content get/set
  • Custom URL openers
  • Scraping-oriented documentation
  • PyQuery chainable interface

Use cases

  • HTML scraping and extraction
  • Tweaking parsed markup in scripts
  • Parsing XML configuration or feeds
  • Test fixtures over saved HTML
  • Familiar jQuery patterns in Python

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