From: CMDR furrycat Date: Tue, 28 Mar 2017 21:35:09 +0000 (+0100) Subject: Recognise www Youtube URLs. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=2d19afcd0dac71db78be4d6b34a851549e52c99f;p=furrycat%2Fcatbot.git Recognise www Youtube URLs. --- diff --git a/bot.py b/bot.py index 8a2187f..dbd0fc6 100644 --- a/bot.py +++ b/bot.py @@ -521,7 +521,7 @@ def voice_channel_for_user(user): return voice_channel async def create_player(voice, url): - if re.match(r'https?://youtu(?:\.be|be\.com)/', url): + if re.match(r'https?://(?:www\.)?youtu(?:\.be|be\.com)/', url): player = await voice.create_ytdl_player(url) else: player = voice.create_ffmpeg_player(url)