← Back to Blog
pullmdweb-scrapingclaude-codeMarch 8, 2026 · 5 min read

PullMD Part 1: Ctrl+A and the Junk Context

RAW INPUT → PARSE & FILTER → MARKDOWN
Editorial diagram: a tall console labeled PARSE & FILTER between a noisy Reddit-like input panel on the left and a clean markdown output panel on the right; bottom row shows the parser pipeline producing structured data.Editorial diagram: a tall console labeled PARSE & FILTER between a noisy Reddit-like input panel on the left and a clean markdown output panel on the right; bottom row shows the parser pipeline producing structured data.

I’m sitting in front of a long Reddit thread where someone describes exactly the problem I’m working on right now. Ctrl+A, Ctrl+C, paste into the chat. On mobile it’s the same routine, just clunkier: select all, copy, paste — because “Share to Claude” doesn’t work on Reddit; they block AIs. And I keep catching myself going through exactly these motions.

The answer is usable in the end. What’s expensive is the path to it: a third of what I pasted is navigation bar, a third cookie banners and sidebar ads, and only the last third is the actual content. Tokens and time get burned on noise before the model has read a single sentence of the relevant post. I wanted the chatbot to understand the thread — not co-read the entire Reddit UI.

That’s not a new insight. But it irritates me every single time. And eventually, one time too many was enough.

The Brief Hope: Cloudflare Introduces a Markdown Service

Cloudflare launched a markdown service — a URL as input, clean markdown as output, no UI overhead. I tried it immediately. A few Wikipedia articles, a tech blog — the results looked impressive. Clean markdown, no navigation, no ads.

The excitement lasted a few days. Then came the letdown: the service only works if the target site actively supports it. Site owners have to opt in. Reddit doesn’t. Most of the blogs I read every day don’t either. For those sites I get either an error or the exact same HTML soup, just one API call further away.

I’d almost considered building a skill around it — an automation that uses the Cloudflare route for the handful of supported sites. But a tool that only works for a fraction of the sources I actually use isn’t a solution. It’s a band-aid.

Building It Myself, Starting Small

The decision came quickly: if there’s nothing ready-made that actually works, I’ll build it myself. But not big, and not all at once. Reddit first — because it’s my most frequent source, and because there’s a known workaround: just append .json to any Reddit URL and you get the raw data without an API key, without OAuth, without app registration. It’s been documented for years, still active, and exactly the right first step.

For Android, the service should be installable as a PWA with the Web Share Target API — so I can hit “Share” directly from the Reddit app and send the link to my service, without a detour through a browser tab. But before writing a single line of code, I wanted to think through the concept first. So: a planning chat on claude.ai to sort out the architecture — and then let Claude Code loose with the finished spec.

The Concept Chat (March 2)

The concept chat started with a typo my autocorrect produced. My first prompt asked for a tool that worked with “vault posts.” Claude figured out pretty quickly what I meant: Reddit. (In German, Reddit and Tresor — vault — look surprisingly similar to autocorrect, so that’s the word that came out.) It amused me briefly and reminded me at the same time why I was having this conversation — because the model, given the right context, understands what I mean anyway. And improving that context was exactly what I was after.

The central architecture question was: one entry point or two? Claude laid it out clearly. The core is an HTTP endpoint — for CLI, Claude Code itself, n8n workflows. On top of that sits a minimal web UI as a PWA — for Android, with the share target. Both paths lead to the same endpoint but serve different consumers. The model recommended skipping the official Reddit API, since access is now gated behind a request process. Instead: a dual strategy — the .json trick first (URL + .json, with a realistic User-Agent header), and if Reddit blocks, fall back to HTML scraping from old.reddit.com. Old Reddit is much simpler to parse than the current design, and no headless browser needed.

On comment formatting, Claude made a call I liked immediately: indent with two spaces instead of markdown blockquotes (> > >). The reasoning is practical — with nested replies beyond depth four, >-chains in copy-paste output become nearly unreadable in chatbots. Indentation keeps the hierarchy visible without burying the token structure.

Then came the moment when the codename was chosen. Claude proposed a short codename, which I used for the next few weeks — and later had to drop for trademark reasons. More on that in Part 4.

At the end of the chat came the question of subdomain. My home network follows a fixed subdomain scheme, and I simply asked Claude to pick a name for the new service.

Web Share Target API — A Quick Explanation

The Web Share Target API is a manifest entry that allows an installed PWA to register itself in the Android share sheet. The key word is installed — not just bookmarked in the browser, but installed via the browser’s “Install app” or “Add to home screen” dialog. The PWA also needs to run over HTTPS (which with Traefik as a reverse proxy involves no extra effort).

The minimal manifest entry looks like this:

"share_target": {
  "action": "/share",
  "method": "GET",
  "params": {
    "url": "link"
  }
}

Once the PWA is installed, it appears in the Android share dialog alongside WhatsApp, Signal, and the rest. One tap on the entry opens the app with the shared link already pre-filled. For anyone who wants to make their own URL-to-X service usable on Android without building a native app, this is the most direct path.

The Result: A Spec, No Code

At the end of the chat was a complete specification: file structure, API design with parameters and return formats, PWA manifest, Docker Compose with Traefik labels. A sample output format with indented comments. All open questions answered.

Not a single character of code — that was the plan. The chat was there to clarify, not to build. Building was Claude Code’s job, with the spec as its brief. That same evening, at 21:53, it began.


Part 1 of 9 in the PullMD series.

PullMD Part 2: From Spec to Running Container