---
type: "Source File"
title: "!/usr/bin/env python3"
description: "#!/usr/bin/env python3 \"\"\"What does index_status='noindex' actually take away from a reader? Compares an already-noindexed analysed article against an indexed one across every reader-facing surface. READ-ONLY. \"\"\"."
resource: "https://www.copecheck.com"
tags: ["copecheck", "main", "source-file", "py"]
timestamp: "2026-09-25T21:04:15Z"
site: "main"
source_path: "copecheck/verify_noindex_scope.py"
---

# !/usr/bin/env python3

Source path: `copecheck/verify_noindex_scope.py`  
Index snapshot generated: `2026-11-24T13:42:54Z`  
File modified: `2026-09-25T21:04:15Z`

```py
#!/usr/bin/env python3
"""What does index_status='noindex' actually take away from a reader?

Compares an already-noindexed analysed article against an indexed one across
every reader-facing surface. READ-ONLY.
"""
import os
import re
import sqlite3
import urllib.request

HERE = os.path.dirname(os.path.abspath(__file__))
DB = os.path.join(HERE, "data", "copecheck.db")
BASE = "http://localhost:8096"
c = sqlite3.connect(f"file:{DB}?mode=ro", uri=True)
c.row_factory = sqlite3.Row


def get(path):
    req = urllib.request.Request(BASE + path,
                                 headers={"User-Agent": "CopeCheckProbe/1.0"})
    try:
        r = urllib.request.urlopen(req, timeout=30)
        return r.status, r.read().decode("utf-8", "replace")
    except Exception as e:
        return getattr(e, "code", "ERR"), ""


noidx = c.execute(
    "SELECT slug,title FROM articles WHERE index_status='noindex' "
    "AND status='analysed' AND verdict_md IS NOT NULL "
    "ORDER BY analysed_at DESC LIMIT 1").fetchone()
idx = c.execute(
    "SELECT slug,title FROM articles WHERE index_status='index' "
    "AND status='analysed' ORDER BY analysed_at DESC LIMIT 1").fetchone()

print("noindexed sample:", noidx["slug"])
print("indexed   sample:", idx["slug"])
print("=" * 68)

for label, row in (("NOINDEXED", noidx), ("INDEXED", idx)):
    slug = row["slug"]
    st, html = get(f"/v/{slug}")
    robots = re.search(r'<meta name="robots" content="([^"]+)"', html)
    print(f"\n{label}  /v/{slug[:44]}")
    print(f"  page returns          : {st}")
    print(f"  robots meta           : {robots.group(1) if robots else '(none)'}")
    print(f"  full verdict rendered : "
          f"{'yes' if len(html) > 5000 else 'NO (short page!)'}")

    # internal search
    words = [w for w in re.findall(r"[A-Za-z]{5,}", row["title"] or "")][:3]
    q = "+".join(words)
    _, s = get(f"/search?q={q}")
    print(f"  findable in site search: {'YES' if slug in s else 'no'}  (q={q})")

    # RSS feed
    _, feed = get("/feed.xml")
    print(f"  present in RSS feed    : {'YES' if slug in feed else 'no'}")

    # sitemap
    _, sm = get("/sitemap.xml")
    print(f"  present in sitemap.xml : {'YES' if slug in sm else 'NO'}")

    # homepage (show_all paginated listing)
    found = False
    for p in range(1, 4):
        _, h = get(f"/?page={p}&show_all=1")
        if slug in h:
            found = True
            break
    print(f"  in homepage listing    : "
          f"{'YES (page %d)' % p if found else 'not in first 3 pages'}")

print("\n" + "=" * 68)
print("CONCLUSION: differences between the two rows above are exactly what")
print("noindex changes. Anything identical is unaffected by noindexing.")
c.close()
```
