Properly parse URLs
This commit is contained in:
parent
25adb45b50
commit
0ecb651b2d
1 changed files with 3 additions and 1 deletions
|
@ -204,7 +204,8 @@ class AutoResponder(commands.Cog):
|
|||
}
|
||||
# ^ All containers allowed to contain HEVC
|
||||
# per https://en.wikipedia.org/wiki/Comparison_of_video_container_formats
|
||||
if link.lower().endswith(tuple(hevc_containers)):
|
||||
parsed = urlparse(link.lower())
|
||||
if parsed.path.endswith(tuple(hevc_containers)):
|
||||
self.log.info("Found link to transcode: %r", link)
|
||||
try:
|
||||
async with message.channel.typing():
|
||||
|
@ -262,6 +263,7 @@ class AutoResponder(commands.Cog):
|
|||
|
||||
if reaction.message.author != self.bot.user:
|
||||
if str(reaction.emoji) == "\N{VIDEOCASSETTE}":
|
||||
self.log.info("Got VHS reaction, scanning for transcode")
|
||||
extra = []
|
||||
if reaction.message.attachments:
|
||||
extra = [attachment.url for attachment in reaction.message.attachments]
|
||||
|
|
Loading…
Reference in a new issue