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)