Rendering the web, explained with working code
Practical guides for the libraries you already use — Puppeteer, Playwright, Selenium, headless Chrome — plus HTML to markdown for LLMs and browser tools for AI agents. Each one shows the free, self-hosted way first and says honestly when an API is the better trade.
Playwright PDF Generation: page.pdf() in Python, Node.js and C#
page.pdf() in Python, Node.js and C#: every option, HTML strings vs URLs, headers and page numbers, print CSS, running it in a web service and Docker.
Puppeteer PDF: HTML to PDF in Node.js with page.pdf()
Every page.pdf() option, margins, headers and footers with page numbers, CSS page breaks, a production Node.js server, Docker and Lambda notes, and fixes for common errors.
Screenshots
Playwright Screenshots: Full Page, Element, On Failure and Visual Comparison
page.screenshot() and locator.screenshot() in Python, JavaScript, Java and C#: full page, element, masks, formats, screenshot on failure and visual comparison.
Puppeteer Screenshot: Full Page, Element, and Every Option
Full-page, element and clipped screenshots in Puppeteer, viewport and device scale, formats and quality, buffers and base64, lazy images, cookie banners, and batch capture.
Selenium Screenshots in Python, Java and C#: Full Page, Element and On Failure
save_screenshot, element screenshots and every working full-page method (Firefox, Chrome CDP, WebDriver BiDi) in Python, Java and C#, plus screenshots on test failure.
Headless browsers
Headless Chrome in Docker: Images, Sandbox, /dev/shm, Fonts and Memory
Run headless Chrome in Docker without --no-sandbox: base images, seccomp vs SYS_ADMIN, /dev/shm, emoji and CJK fonts, memory limits, zombie processes, new vs old headless, and Python.
How to Scrape JavaScript Websites with Python and Node.js
Why requests + BeautifulSoup sees empty pages, and how to scrape dynamic sites: hidden JSON APIs, Playwright, Puppeteer, waits and infinite scroll.
Markdown & AI
How to Convert HTML to Markdown in Python, JavaScript and Node.js
Convert HTML to markdown in Python and Node.js: markdownify, trafilatura, html2text, Turndown and Readability compared, with tested code.
Web Scraping for LLMs: Turn Websites into Clean Markdown for RAG
Turn websites into clean, chunked markdown for LLMs and RAG: crawl politely, render only when needed, chunk by tokens, embed and cite. Python and Node.
MCP & agents
Best browser MCP servers for Claude, Claude Code and Cursor (2026)
Playwright MCP, Chrome DevTools MCP, Firecrawl, Jina, Browserbase, browser-use and more: install lines, free tiers, local vs hosted, verified November 2026.
How to give Claude web access with MCP (Claude Desktop, Claude Code, Cursor)
Step by step: add a web-scraping or browser MCP server to Claude Desktop, Claude Code and Cursor, with config paths, example prompts and fixes for npx errors.