mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-17 18:25:42 +02:00
[eric] web: startpage's proof-of-work wall now covers POST too; name it a refusal so the breaker benches the dead engine honestly
This commit is contained in:
@@ -92,6 +92,9 @@ async def search_startpage(query: str, num_results: int) -> StartpageAnswer:
|
|||||||
results = parse_startpage_results(reply.text, num_results)
|
results = parse_startpage_results(reply.text, num_results)
|
||||||
if results:
|
if results:
|
||||||
return StartpageAnswer(results=results)
|
return StartpageAnswer(results=results)
|
||||||
|
# Since ~2026-08 the POST gets the same ~10KB proof-of-work interstitial as GET (measured: 10,349 bytes, zero result anchors, 'challenge' markers); name it a refusal so the breaker benches the engine instead of treating the wall as a mystery empty page.
|
||||||
|
if "challenge" in reply.text and len(reply.text) < 40_000:
|
||||||
|
return StartpageAnswer(refused=True)
|
||||||
# Measured once in 14 tight-loop requests: Startpage serves its own no-results page for a query that answered 10 results a second later, so an empty page is only trustworthy when it says so.
|
# Measured once in 14 tight-loop requests: Startpage serves its own no-results page for a query that answered 10 results a second later, so an empty page is only trustworthy when it says so.
|
||||||
if P_NO_RESULTS_MARKER in reply.text:
|
if P_NO_RESULTS_MARKER in reply.text:
|
||||||
return StartpageAnswer()
|
return StartpageAnswer()
|
||||||
|
|||||||
Reference in New Issue
Block a user