git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
569728c
)
Recognise www Youtube URLs.
author
CMDR furrycat
<elite@furrycat.net>
Tue, 28 Mar 2017 21:35:09 +0000
(22:35 +0100)
committer
CMDR furrycat
<elite@furrycat.net>
Tue, 28 Mar 2017 21:35:09 +0000
(22:35 +0100)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
8a2187f
..
dbd0fc6
100644
(file)
--- 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)