diff --git a/sopel/modules/meetbot.py b/sopel/modules/meetbot.py index f0c007f24f..e43d56da6d 100644 --- a/sopel/modules/meetbot.py +++ b/sopel/modules/meetbot.py @@ -342,7 +342,7 @@ def meetinglink(bot, trigger): if not link.startswith("http"): link = "http://" + link try: - title = find_title(link) + title = find_title(link, verify=bot.config.core.verify_ssl) except: title = '' logplain('LINK: %s [%s]' % (link, title), trigger.sender) diff --git a/sopel/modules/url.py b/sopel/modules/url.py index d2a83df848..b42fd0c62b 100644 --- a/sopel/modules/url.py +++ b/sopel/modules/url.py @@ -158,7 +158,7 @@ def process_urls(bot, trigger, urls): if matched: continue # Finally, actually show the URL - title = find_title(url) + title = find_title(url, verify=bot.config.core.verify_ssl) if title: results.append((title, get_hostname(url))) return results @@ -182,9 +182,9 @@ def check_callbacks(bot, trigger, url, run=True): return matched -def find_title(url): +def find_title(url, verify=True): """Return the title for the given URL.""" - response = requests.get(url, stream=True) + response = requests.get(url, stream=True, verify=verify) try: content = '' for byte in response.iter_content(chunk_size=512, decode_unicode=True):