Promote develop → main (2026-05-09 10:57 UTC) #21

Zusammengeführt
IntelSight_Admin hat 15 Commits von develop nach main 2026-05-09 12:57:14 +02:00 zusammengeführt
Nur Änderungen aus Commit a716726e36 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@@ -143,18 +143,28 @@ async def _check_source_reachability(
if url and not url.startswith(("http://", "https://")):
url = "https://" + url.lstrip("/")
# Initialen UA waehlen: googlebot direkt; paywall ueber removepaywalls; default normal
# Initialen UA waehlen
initial_ua = HEALTH_CHECK_USER_AGENT
initial_url = url
if strategy == "googlebot":
initial_ua = USER_AGENT_GOOGLEBOT
elif strategy == "paywall":
initial_url = REMOVEPAYWALLS_PREFIX + url
# Paywall-Quellen: Feed-URL direkt laden, aber mit Browser-UA (versucht Bot-Detection zu umgehen).
# removepaywall.com ist fuer Article-URLs, NICHT fuer RSS-Feed-Validity-Checks
# (gibt HTML statt XML zurueck). Researcher-Pipeline nutzt removepaywall fuer Inhalte.
initial_ua = USER_AGENT_BROWSER
try:
resp = await client.get(initial_url, headers={"User-Agent": initial_ua})
# Paywall-Quellen: 4xx ist erwartbar (Bot-Detection), als warning markieren statt error
if strategy == "paywall" and resp.status_code in RETRY_ON_STATUS:
checks.append({
"type": "reachability", "status": "warning",
"message": f"Paywall-Quelle, Direkt-Zugang HTTP {resp.status_code} (Researcher-Pipeline nutzt removepaywall.com fuer Inhalte)",
})
return checks # Feed-Validity-Check skippen (Paywall liefert kein RSS)
# Bot-Block-Retry nur bei strategy='default'
if (
strategy == "default"
@@ -167,7 +177,6 @@ async def _check_source_reachability(
"type": "reachability", "status": "warning",
"message": f"Erreichbar nur mit Googlebot-UA (Standard-UA bekam HTTP {initial_url and 'unknown' or 'XXX'})",
})
# Hinweis-Eintrag, aber Hauptcheck folgt unten als 'ok' weil resp jetzt die Retry-Antwort ist
if resp.status_code >= 400:
checks.append({