Skip to content

bundlenews/mercury-parser-api

 
 

Repository files navigation

mercury-parser-api

A 2019 fork of HenryQW/mercury-parser-api — a Dockerized HTTP wrapper around the Postlight Mercury Parser library — used by Bundle as an article content-extraction ("URL fetcher") service at http://mercury-parser-api.bundletheworld.com/parser?url=….

Status

Archive / Not in use. This repository's code no longer runs anywhere. The last commit is from 2019, and Bundle's only addition to the upstream fork was an ECS task-definition that targeted the now-decommissioned legacy AWS account.

⚠️ The live endpoint is NOT served from this repo — do not decommission it when archiving. mercury-parser-api.bundletheworld.com is still up and still used, but it is now a separate Deno reimplementation running as a Bunny Magic Container from the image ghcr.io/bundlenews/mercury-parser (pushed manually; that Deno rewrite has no source repo). It uses the newer @postlight/parser library and keeps the same hostname and /parser?url= contract, so every caller below keeps working unchanged. Archiving this repository only freezes the old Node/Express source; it does not touch the running service.

What it was

A near-pristine fork of the community mercury-parser-api project. Bundle's entire contribution is 3 commits by İlker Kopan on 2019-04-16 adding task-definition-input.json (an ECS task-def for the legacy account 362133112692, eu-west-1); the upstream parser code was left untouched.

  • Stack: Node/Express, @postlight/mercury-parser@^2.0.0, listens on port 3000.
  • Endpoints (routes.js): GET /parser?url=…Mercury.parse(url) → article JSON (title, content, author, date, lead image, excerpt, word count, …); GET / → a welcome JSON message.
  • Runs from Dockerfile (node:10-alpine). No application configuration or secrets.

How it was used

Callers pass a URL and use the extracted content as a fallback when RSS/scrape data is thin — title, description, or lead image. These callers hit the hostname, so they now reach the Deno successor, not this code:

  • py-crawlerestimators/description_estimator.py:19, estimators/image_estimator.py:369, extractors/title_extractor.py:36
  • xhelper-enginexhelper/utils/bundle_helper.py:39 (extract_title_with_mercury)
  • xhelper-seleniumscraper/tweet_scraper.py:67
  • xhelper-workerconsumer.py:77 (the call is commented out in write_to_bundle)
  • bundle (monorepo) — Bundle.Core/Program.cs:1487BundleUtility/Handlers/ContentHandler.cs:95, and Streamer/TwitterStream.cs:662

What replaced it

Old (this repo) New (live service)
Runtime Node / Express Deno
Library @postlight/mercury-parser (2.x) @postlight/parser (Mercury → Postlight rename)
Port 3000 8000
Deploy ECS task-def, legacy AWS account (gone) Bunny Magic Container (ghcr.io/bundlenews/mercury-parser, manual push, no repo)
Endpoint mercury-parser-api.bundletheworld.com/parser same hostname + /parser contract

The reimplementation was fingerprinted against the live endpoint: a no-URL request returns {"error": "Missing 'url' query parameter"} (this repo returns "No URL was provided"), the root path 404s (this repo serves a welcome JSON), and it listens on 8000 (this repo, 3000).

Known issues (all moot — repo is archived)

  • The pinned stack is end-of-life: node:10-alpine and 2019 dependencies (npm audit reports ~95 advisories). Not a concern because nothing runs from here; the live service is a separate, current codebase.
  • task-definition-input.json references the decommissioned legacy AWS account — deploy residue, not a live target.

Provenance

  • Repo: github.com/bundlenews/mercury-parser-api (fork of HenryQW/mercury-parser-api, itself derived from Postlight's Mercury Parser).
  • Last commit 8d9b3c6 (2019-04-16, İlker Kopan). Bundle delta: task-definition-input.json only.
  • Audit: INACTIVE / REVIEW ("check Bunny before archiving") → resolved Archive / Not in use (2026-07-10); the Bunny Magic Container was confirmed live and traced to the separate Deno image, and the repo confirmed unused.

About

🐋 A Dockerized drop-in replacement for the Mercury Parser API.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages