Fix YouTube handling

This commit is contained in:
Robert Miles 2018-11-15 18:16:31 -05:00
parent d1d573c9a8
commit 93caa37424
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -9,7 +9,7 @@ SOTDS = datastore.DataStore("sotd.json")
def get_title(link):
title = str(urlopen(link).read()).split("<title>", 1)[1].split("</title>", 1)[0]
if "YouTube" in title:
return title.split(" - Youtube", 1)[0]
return title.split(" - YouTube", 1)[0]
return title
class SOTDBot(teambot.Handler,teambot.CommandHandlerMixin):