aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/ddg.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-09-30 19:56:30 -0400
committerlolcat <will@lolcat.ca>2025-09-30 19:56:30 -0400
commit4b16fd58971321e6938046702210e2773573c621 (patch)
tree20ad8b25d211cfb59c7601e21f0c7b27cf638efd /scraper/ddg.php
parent61deefb75bdaf5e940eefffdd85f058e370623bb (diff)
filter ads from the html endpoint
Diffstat (limited to 'scraper/ddg.php')
-rw-r--r--scraper/ddg.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/scraper/ddg.php b/scraper/ddg.php
index af96465..c59b423 100644
--- a/scraper/ddg.php
+++ b/scraper/ddg.php
@@ -679,6 +679,12 @@ class ddg{
$this->fuckhtml->load($result);
+ if(stripos($result["attributes"]["class"], "result--ad") !== false){
+
+ // found an ad
+ continue;
+ }
+
$title =
$this->fuckhtml
->getElementsByTagName(
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage