From 94186bde4ee11ed6bf98a78b291736bb70789a88 Mon Sep 17 00:00:00 2001 From: 50501AZ Webmaster Date: Sat, 28 Jun 2025 13:42:32 -0700 Subject: [PATCH] =?UTF-8?q?I=20am=20bad=20at=20SQL=20=F0=9F=92=80?= =?UTF-8?q?=F0=9F=92=80=F0=9F=92=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- producerstopicenet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/producerstopicenet.py b/producerstopicenet.py index 3c6727b..a750922 100644 --- a/producerstopicenet.py +++ b/producerstopicenet.py @@ -39606,6 +39606,7 @@ class ProducerStopIceNet(Plugin): async def poll(self): # Loop forever :3 for i in range(1000000000000): + self.log.debug("Proc") # Sleep for n seconds await asyncio.sleep(self.config["refresh_delay"]) @@ -39626,13 +39627,15 @@ class ProducerStopIceNet(Plugin): # Filter by alert to ones with an ID not in the database known_alerts_filtered = set() + self.log.debug(known_alerts) for alert_url in known_alerts: alert_id = url_to_id(alert_url) if "--" in alert_id or ";" in alert_id: continue # BF worried about injection - if await self.database.fetchrow("SELECT $1 FROM reports", alert_id): + if await self.database.fetchrow("SELECT id FROM reports where id=$1", alert_id): + self.log.debug("FOUND") continue else: known_alerts_filtered.add(alert_url) - + self.log.debug(known_alerts_filtered) for alert_url in known_alerts_filtered: # Get page alert_id = url_to_id(alert_url)