From: Michael Tremer Date: Fri, 2 Jan 2026 13:22:51 +0000 (+0000) Subject: sources: Consider ABP files as such without the header X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abc7cacafdec2c0f5a09655f0d0d4d6788223e0a;p=dbl.git sources: Consider ABP files as such without the header Some files don't have the [Adblock Plus] header, but they use ! as a comment, so we can identify them that way. Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index e0c33ea..5705daf 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -396,7 +396,7 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): Called very early when we are detecting the format """ # Check for the Adblock Plus header - if line == "[Adblock Plus]" or line.startswith("||"): + if line == "[Adblock Plus]" or line.startswith("!") or line.startswith("||"): return Format.ADBLOCKPLUS # Is this a hosts file?