disable urlinfo as it can make the bot run OOM

This commit is contained in:
jkhsjdhjs 2023-07-16 22:24:49 +00:00
parent 7009169145
commit e6f8dbd1e8

24
bert.py
View File

@ -502,18 +502,18 @@ def command_loop():
say(channel, b+user+": "+c+text)
except Exception as err:
print("twitter link invalid "+str(err))
elif urlinfo.is_url(msg) != None:
try:
url = urlinfo.is_url(msg)
ignore = ["pr0gramm", "w0bm", "f0ck", "twitter", "youtube", "youtu.be"]
if any(ign in url for ign in ignore):
pass
else:
title = urlinfo.get_title(url)
print("Found URL and got title "+str(title))
say(channel, b+"Title: "+c+title)
except Exception as err:
print("Error getting URL title - "+str(err))
# elif urlinfo.is_url(msg) != None:
# try:
# url = urlinfo.is_url(msg)
# ignore = ["pr0gramm", "w0bm", "f0ck", "twitter", "youtube", "youtu.be"]
# if any(ign in url for ign in ignore):
# pass
# else:
# title = urlinfo.get_title(url)
# print("Found URL and got title "+str(title))
# say(channel, b+"Title: "+c+title)
# except Exception as err:
# print("Error getting URL title - "+str(err))
elif msg == ".fml":
try:
fml_string = fml.get_fml(fml_url)