Jane Thompson 審核 212 個商業 Podcast RSS feed,揭示聯絡資料問題與解析陷阱
I audited 212 business podcast RSS feeds. Here is where the contact data breaks
Jane Thompson 審核 212 個商業 Podcast RSS feed,發現 67.5% 至少在 channel head 列有電郵地址,而找到的地址中 13.3% 是託管平台別名或 noreply 郵箱。
Every podcast lead list I looked at was priced per row and silent about how the rows were built. So before writing the discovery layer for a small API of my own, I spent a weekend measuring what is actually inside podcast RSS feeds: 212 business podcasts across six niches — fintech, ecommerce, cybersecurity, B2B sales, martech, and logistics.
67.5% of those feeds expose at least one email address in the channel head, and 13.3% of the addresses I found did not belong to a human. So roughly two thirds of a paid list would have carried an address at all; the other third carried nothing you could mail. The audit also forced three rewrites of the scraper, and all three problems only show up once you stop running five feeds and start running a few hundred.
What the audit found
I fetched the channel head plus the pubDates of the first few items and stopped there — no show notes, no transcripts. That head answers the only two questions a lead buyer has: is there a contactable owner, and is the show still alive.
| What I measured | Figure |
|---|---|
At least one email in the channel head (itunes:owner, author, managingEditor) |
67.5% |
| Hosting-platform aliases or noreply mailboxes among the addresses found | 13.3% |
| A website field present | 93% |
A <link> value that points back at the feed itself |
70% |
| Social handles anywhere in the head | ~15% |
Two fields came free: language is a standard tag parsed off the channel, and the last few episode titles sit in the same <item> elements you already read for pubDates.
The 15% figure is the one I trust least, so I checked it twice: a separate random sample of 20 feeds produced exactly 3 with a social profile in the head — 15% again. Most shows keep social links deep in the show notes, where a head-only parse never sees them.
Trap 1: some feeds are 20 MB
The largest feed in the sample was 20 MB and carried 500+ episodes, each with a page of show notes. Parsing that into a DOM is how a 300 ms request becomes a four second request and a memory spike. The parser here is incremental: bytes in, events out, each element cleared as soon as it is consumed.
async with client.stream(
"GET",
feed_url,
timeout=httpx.Timeout(timeout, connect=min(timeout, 5.0)),
headers={"User-Agent": USER_AGENT, "Accept": "application/rss+xml, application/xml, text/xml, */*"},
follow_redirects=True,
) as response:
status = response.status_code
content_type = response.headers.get("content-type")
if status >= 400:
error = f"HTTP {status}"
else:
async for chunk in response.aiter_bytes():
if not chunk:
continue
bytes_read += len(chunk)
parser.feed(chunk)
if parser.done:
truncated = True
break
if bytes_read >= max_bytes:
truncated = True
break
max_bytes defaults to 512 KB and max_items to 5. The parser sets done after five pubDates plus a title or owner email, and the loop then stops reading from the socket instead of draining the rest of the response. A 20 MB feed costs at most 512 KB of traffic.
A ParseError is not fatal: breaking a feed mid-document is normal, so the error is recorded and the half-parsed head is still used — one bad feed should not sink a batch of twenty.
Trap 2: hosting aliases look exactly like email addresses
podcasts43+9f2c1@anchor.fm is a syntactically valid address. So is feeds@spreaker.com. Both reach a ticket queue. Of the addresses found across the 212 feeds, 13.3% were this kind — libsyn, anchor, buzzsprout, podbean, simplecast, megaphone, acast, spreaker, blubrry, transistor, fireside, art19, omny, soundcloud.
Filtering is a domain list plus a pattern check — the cheapest part of the pipeline. The expensive part is discipline: itunes:owner is the most reliable email source in a feed and also the tag most often filled with feeds@ by the hosting side. It gets priority, but it still passes the same noise filter:
primary = (head.owner_email or "").strip().lower() if head.owner_email else None
if primary and not is_noise(primary) and primary not in email_candidates:
email_candidates.insert(0, primary)
The ordering matters. A clean owner tag becomes the primary email; an alias is dropped and the description-derived address takes the slot. There is no branch where a hosting alias ends up as primary_email.
Trap 3: the <link> element usually points at the feed
93% of feeds list a website, which sounds solved until you notice that 70% of those <link> values are not the show's site. A common feed preamble looks like this:
<atom:link rel="self" href="https://feeds.megaphone.fm/something"/>
<link>https://theactualshow.com</link>
Take the href of the first element and you publish a player URL as the show's homepage. The fix ignores any link whose rel is self, hub or enclosure, and prefers element text over attributes, since a real site is written as text:
elif tag == "link" and parent == "channel":
# <atom:link rel="self" href="...feed..."/> commonly precedes the real
# <link>https://show.example</link>; taking the href blindly would publish
# the feed URL as the show's website.
rel = (elem.get("rel") or "").strip().lower()
if rel not in _LINK_RELS_IGNORED:
href = (elem.get("href") or "").strip()
candidate = text or href or None
if candidate and (self.link is None or (text and self._link_from_href)):
self.link = candidate
self._link_from_href = not text
The _link_from_href flag handles an attribute candidate arriving first and the text one second. Without it, order of appearance decides which URL a buyer sees, and in my sample that order was wrong more often than not.
The concurrency model took three tries
Everything above is per-feed work. End-to-end latency is decided by how those fetches overlap, and this is where I made the most mistakes.
Version one was the obvious one: waves of 8 and asyncio.gather per wave. It worked until one feed in a wave burned its full 8 second timeout and the other seven slots sat idle. Version two shrank the waves to 4 with as_completed inside each: that fixed the tail and broke the average, because two waves became three and the rounds serialised. Version three keeps a fixed number of probes in flight and refills the instant one finishes. Same 12 keywords, limit=10, requireEmail=true, activeWithinDays=90, measured against the deployed service:
| Version | Leads returned | p50 | max | min |
|---|---|---|---|---|
| gather over waves of 8 | 81/120 | 3,487 ms | 12,521 ms | — |
| fixed wave of 4 | 83/120 | 4,143 ms | 7,172 ms | 2,855 ms |
| sliding window | 83/120 | 3,140 ms | 6,450 ms | 1,399 ms |
The window version is about 10% faster than the baseline at p50 and cuts the maximum by 48%, from the same twelve queries against the same endpoint.
queue = iter(candidates)
inflight: set[asyncio.Task[PodcastLead]] = set()
def dispatch() -> None:
meta = next(queue, None)
if meta is not None:
inflight.add(asyncio.create_task(one(meta)))
window = max(1, min(RSS_CONCURRENCY, want))
try:
for _ in range(window):
dispatch()
while inflight and len(kept) < want:
done, _ = await asyncio.wait(inflight, return_when=asyncio.FIRST_COMPLETED)
for task in done:
inflight.discard(task)
lead = task.result()
reason = _reject_reason(lead, req.requireEmail, req.activeWithinDays, req.minEpisodes)
if reason is not None:
filtered[reason] = filtered.get(reason, 0) + 1
else:
kept.append(lead)
if len(kept) >= want:
break
dispatch()
finally:
# A satisfied request must not pay for in-flight probes it no longer needs.
for task in inflight:
task.cancel()
if inflight:
await asyncio.gather(*inflight, return_exceptions=True)
Two details matter: window = max(1, min(RSS_CONCURRENCY, want)) stops a limit=3 request from prefetching eight feeds, and the finally block cancels probes once the quota is met, because the request is already answerable.
The tail that is left is not a concurrency problem
Two keywords still end around 6 seconds: HR tech at 6.2 s and AI SaaS at 6.5 s, after scanning all 20 candidates and returning 4 and 2 leads. That latency is set by the slowest single feed, capped by the 8 second timeout. Driving it lower means scanning fewer candidates, which costs the recall the concurrency work was protecting.
The related fix is negative caching: 403, 404, 410, 451 and dead DNS names remembered for 6 hours; 5xx, timeouts and connection errors for 15 minutes. A feed dead for months stays dead, and re-probing it on every query is how one request becomes twenty.
Charge for leads, not for calls
This is a product decision rather than a technical one, but it shaped the code.
The API bills per returned lead. Billing per request would create an incentive I did not want: a buyer who has paid for a call keeps the keyword broad so the call is not wasted, and broad keywords return worse data. Per-lead billing moves that risk to the seller — a query that returns nothing usable costs nothing, and the response carries X-RapidAPI-Billing: Leads=0.
That rule is a hard constraint: an empty or dead-feed path must never be a 5xx. It is the easiest way to signal "nothing found" and the fastest way to lose your service-level rating. Those paths return a 200 with an empty lead list and a zero billing header; only malformed input (422) and missing auth (401) answer with a real error code.
Cost then works the other way round too. When a filter is applied, the API asks upstream for min(limit * 2, 40) candidates instead of limit and stops as soon as enough survive. Before that, a request for 10 leads with an email requirement returned 53 of 120 possible leads across 12 keywords, 45%. After it, 81 of 120, or 67.5%, and the average response went from 4.4 leads to 6.8. The extra scanning is the seller's cost, not a failed call the buyer paid for. It did make latency worse — p50 from 2,919 ms to 3,487 ms, max from 5,392 ms to 12,521 ms — which is exactly why the concurrency model had to be rebuilt rather than tuned.
What I would tell the next person
- Never download the document. Read the head, cap the bytes, stop early, and let a broken parse still yield a usable half-result.
- Assume every convenient field is lying.
<link>points at the feed,itunes:ownerpoints at the host's mailroom, and the social links are somewhere you are not looking. - Measure the tail, not just the average. Every design I tried was fine at p50 and two of them were bad at max, and max is what a buyer notices on a slow query.
The service stays small — FastAPI, httpx, one SQLite cache file, one Fly.io machine, no queue — so maintenance stays low and the data work stays the interesting part. It runs on RapidAPI with 50 leads a month on the free plan, and paid tiers priced from 0.35 to 0.8 cents per lead, plus an MIT-licensed MCP server for calling it from Claude or Cursor.
- API: https://rapidapi.com/JaneThompson/api/podcast-leads-api
- MCP server: https://github.com/fenjiangmiantiao/podcast-leads-mcp
If I did this again, the audit is the part I would keep. If you are building on RSS, the three traps above will find you long before the billing model does.
來源:DEV Community · dev.to
