From eb1f34db36b8bea3788a2e374f0718f2a2c5ce5a Mon Sep 17 00:00:00 2001 From: Dastan-glitch Date: Mon, 20 Mar 2023 17:57:57 +0300 Subject: [PATCH] bin/ircd: [titlebot] continue on SSLERROR: wrong signature type --- bin/ircd/script/bots/titlebot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/ircd/script/bots/titlebot.py b/bin/ircd/script/bots/titlebot.py index 5d46427a8..f55058226 100644 --- a/bin/ircd/script/bots/titlebot.py +++ b/bin/ircd/script/bots/titlebot.py @@ -29,7 +29,11 @@ while True: parsed_url = urlparse(i) if parsed_url.netloc.lower() in ['twitter.com','t.co'] or parsed_url.scheme != 'https': continue - reqs = requests.get(i) + try: + reqs = requests.get(i) + except requests.exceptions.SSLError: + print("SSLERROR: wrong signature type") + continue soup = BeautifulSoup(reqs.text, 'html.parser') try: @@ -39,7 +43,7 @@ while True: continue title_text = title_text.split('\n') title_msg = [] - # remove empty lines from tweet body + # remove empty lines from title body for line in title_text: if not line.strip(): continue