Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed request.exceptions.SSLError #1113

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sopel/modules/meetbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def meetinglink(bot, trigger):
if not link.startswith("http"):
link = "http://" + link
try:
title = find_title(link)
title = find_title(bot, link)
except:
title = ''
logplain('LINK: %s [%s]' % (link, title), trigger.sender)
Expand Down
6 changes: 3 additions & 3 deletions sopel/modules/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(bot, url)
if title:
results.append((title, get_hostname(url)))
return results
Expand All @@ -182,9 +182,9 @@ def check_callbacks(bot, trigger, url, run=True):
return matched


def find_title(url):
def find_title(bot, url):
"""Return the title for the given URL."""
response = requests.get(url, stream=True)
response = requests.get(url, stream=True, verify=bot.config.core.verify_ssl)
try:
content = ''
for byte in response.iter_content(chunk_size=512, decode_unicode=True):
Expand Down