VG-Wort: Zählmarke NUR bei state=1 (live) verbrauchen

- if state == 1 → Zählmarke aus Pool holen + Pixel einbauen
- Korrektur (state=0) → KEINE Zählmarke, Log-Meldung 'Übersprungen'
- Pool: 19/20 verfügbar (1 korrekt für Live-Test verbraucht)
This commit is contained in:
Hermes Agent
2026-06-18 22:42:25 +02:00
parent eb59327086
commit 934ac899ce
+5
View File
@@ -949,7 +949,9 @@ h1{color:#c0392b;}p{color:#888;}</style></head>
alias = re.sub(r'[^a-z0-9]+', '-', title.lower().strip())[:100] alias = re.sub(r'[^a-z0-9]+', '-', title.lower().strip())[:100]
# ── VG-Wort Zählmarke aus Pool holen & einbauen ───────── # ── VG-Wort Zählmarke aus Pool holen & einbauen ─────────
# NUR bei LIVE-Artikeln (state=1)! Korrektur verbraucht keine Zählmarke.
vgwort_pixel_html = "" vgwort_pixel_html = ""
if state == 1:
try: try:
import subprocess import subprocess
result = subprocess.run( result = subprocess.run(
@@ -968,6 +970,9 @@ h1{color:#c0392b;}p{color:#888;}</style></head>
print(f"[VG-Wort] Pool-Script fehlgeschlagen: {result.stderr}", flush=True) print(f"[VG-Wort] Pool-Script fehlgeschlagen: {result.stderr}", flush=True)
except Exception as e: except Exception as e:
print(f"[VG-Wort] Ausnahme: {e}", flush=True) print(f"[VG-Wort] Ausnahme: {e}", flush=True)
else:
print(f"[VG-Wort] Übersprungen — Artikel geht auf Korrektur (state=0), "
f"Zählmarke erst bei Live-Gang", flush=True)
if vgwort_pixel_html: if vgwort_pixel_html:
if '</article>' in article_body: if '</article>' in article_body: