From 1ca2626ad908f80544c2c08e6a444b4fc6d2bec5 Mon Sep 17 00:00:00 2001 From: lolcat Date: Fri, 3 Jan 2025 21:16:00 -0500 Subject: [PATCH] fix ddg bug with EOF result --- scraper/ddg.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scraper/ddg.php b/scraper/ddg.php index a2d43c7..8ad3808 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -612,6 +612,25 @@ class ddg{ } } + $title = + $this->titledots( + $this->fuckhtml + ->getTextContent( + $item["t"] + ) + ); + + if( + $title == "EOF" && + strpos( + $item["c"], + "google" + ) + ){ + + continue; + } + // parse search result $out["web"][] = [ "title" =>