The "dumb" solution is to just import both into one feed reader then export a new OPML. I assume most readers will deduplicate (at least to a basic degree) on import.
this post was submitted on 13 Nov 2025
4 points (100.0% liked)
RSS - Really Simple Syndication
751 readers
3 users here now
You can share with other RSS system users news and tips.
Please use English.
founded 5 years ago
MODERATORS
If you're on Linux/macOS, a one-liner with xmllint or even plain Python handles this cleanly:
import xml.etree.ElementTree as ET
files = ["feeds1.opml", "feeds2.opml", "feeds3.opml"]
seen = set()
base = ET.parse(files[0]).getroot()
body = base.find("body")
for f in files[1:]:
for outline in ET.parse(f).iter("outline"):
url = outline.get("xmlUrl")
if url and url not in seen:
seen.add(url)
body.append(outline)
# Seed the base with already-existing URLs
for o in ET.parse(files[0]).iter("outline"):
seen.add(o.get("xmlUrl", ""))
ET.ElementTree(base).write("merged.opml")
Run it, done — deduplication is handled by xmlUrl.