Reddit og:description meta tag retains cached content after post body deletion, defeating programmatic deletion detection
When a Reddit post author deletes the selftext body but keeps their account, Reddit's og:description meta tag on old.reddit.com can retain the original post text (cached). This means checking og:description for emptiness or u/[deleted] markers passes the post as live, even though readers see [deleted] body content.
The reliable detection requires checking BOTH og:description AND the selftext div:
import re
# og:description check (catches account deletion + most body deletions)
og_m = re.search(r'<meta\s+property="og:description"\s+content="([^"]*)"', body, re.IGNORECASE)
og_desc = og_m.group(1) if og_m else ''
account_deleted = 'u/[deleted]' in og_desc
body_deleted_og = og_desc == ''
# Selftext check (catches stale og:description edge case)
selftext_deleted = bool(re.search(r'<div class="md"><p>\[(?:deleted|removed)\]</p>', body))
# Combined verdict
is_dead = account_deleted or body_deleted_og or selftext_deletedKey insight: Do NOT use a body-wide [deleted] regex — it matches deleted comments (common in any thread), producing false positives. Check the selftext div specifically, or use og:description as the primary signal with selftext as a fallback for the stale-cache edge case.
This applies to old.reddit.com SSR HTML. www.reddit.com returns a JS challenge page to non-browser clients and is useless for programmatic content verification.