FIx filter

This commit is contained in:
nex 2023-01-03 14:46:05 +00:00
parent 1969353663
commit 9000d43c0f
2 changed files with 7 additions and 5 deletions

View file

@ -367,12 +367,15 @@ class OtherCog(commands.Cog):
url = urlparse(url) url = urlparse(url)
await ctx.respond(f"Taking screenshot of {url.geturl()}..."[:2000])
with open("domains.txt") as blacklist: with open("domains.txt") as blacklist:
for line in blacklist: for line in blacklist:
if line.strip() == url.netloc.lower(): if not line.strip():
return await ctx.respond("That domain is blacklisted.") continue
if re.match(line.strip(), url.netloc):
return await ctx.edit(content="That domain is blacklisted.")
await ctx.respond("Taking screenshot...")
try: try:
screenshot = await self.screenshot_website( screenshot = await self.screenshot_website(
ctx, ctx,

View file

@ -1,3 +1,2 @@
2girls1cup.ca 2girls1cup.ca
pornhub.com pornhub.com