Wh

WhiskeySour – A 10x faster drop-in replacement for BeautifulSoup

Hacker News

WhiskeySour – A 10x faster drop-in replacement for BeautifulSoup

The Problem I’ve been using BeautifulSoup for sometime. It’s the standard for ease-of-use in Python scraping, but it almost always becomes the performance bottleneck when processing large-scale datasets. Parsing complex or massive HTML trees in Python typically suffers from high memory allocation costs and the overhead of the Python object model during tree traversal. In my production scraping workloads, the parser was consuming more CPU cycles than the network I/O. Lxml is fast but again uses up a lot of memory when processing large documents and has can cause trouble with malformed HTML. The Solution I wanted to keep the API compatibility that makes BS4 great, but eliminates the overhead that slows down high-volume pipelines. It also uses html5ever which That’s why I built WhiskeySour. And yes… I *vibe coded the whole thing*. WhiskeySour is a drop-in replacement. You should be able to swap from "bs4 import BeautifulSoup" with "from whiskeysour import WhiskeySour" and see immediate speedups. Your workflows that used to take more than 30 mins might take less than 5 mins now. I have shared the detailed architecture of the library here: https://the-pro.github.io/whiskeySour/architecture/ Here is the benchmark report against bs4 with html.parser: https://the-pro.github.io/whiskeySour/bench-report/ Here is the link to the repo: https://github.com/the-pro/WhiskeySour Why I’m sharing this I’m looking for feedback from the community on two fronts: 1. Edge cases: If you have particularly messy or malformed HTML that BS4 handles well, I’d love to know if WhiskeySour encounters any regressions. 2. Benchmarks: If you are running high-volume parsers, I’d appreciate it if you could run a test on your own datasets and share the results.

Share card

Actual performance

8points
1comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
81%81% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, using, code · Missing: mac, agents, macos
78%78% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: pipe, io · Missing: https docs, excited, just released
55%55% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoStrong fit for a featured deal · Missing: plus, platform, intuitive
50%50% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
20%20% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A faster, drop-in replacement for Tailscale's DERP relay57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A faster, drop-in replacement for Tailscale's DERP relay

Hacker News4
Dr
Drop-In Bootstrap 5 Replacement55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Drop-In Bootstrap 5 Replacement

Hacker News4
knotend
knotend49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

10x faster flowchart editor

Indie Hackers1productivity
Re
Reselectie, a smaller/faster replacement to reselect and re-reselect74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Reselectie, a smaller/faster replacement to reselect and re-reselect

Hacker News2
Ex
Expresso: A faster, drop-in replacement for the ExpressJS router54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Expresso: A faster, drop-in replacement for the ExpressJS router

Hacker News3
10
10x Faster Twitter Embeds58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

10x Faster Twitter Embeds

Hacker News14
Sh
Ship Code 10x Faster64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ship Code 10x Faster

Hacker News1
Dr
Drop-in SQS replacement based on SQLite63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Drop-in SQS replacement based on SQLite

Hacker News656
It
Iterate on MVPs 10x Faster57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Iterate on MVPs 10x Faster

Hacker News1
Eloquent
Eloquent29%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Grow on LinkedIn 10X Faster

Indie Hackers