diff --git a/breadtube_bot/bot.py b/breadtube_bot/bot.py index d381294..359294f 100644 --- a/breadtube_bot/bot.py +++ b/breadtube_bot/bot.py @@ -1,6 +1,7 @@ from __future__ import annotations from enum import Enum +import html import http.client import json import logging @@ -11,7 +12,6 @@ import time import tomllib from typing import Any, TYPE_CHECKING import traceback -import urllib.parse from .config import Config from .discord_manager import ApiEncoder, DiscordManager @@ -351,7 +351,7 @@ class Bot: def _video_message_content(self, video: SearchResultItem) -> str: return (self.config.youtube_channel_video_message .replace('{{video_id}}', str(video.id.videoId)) - .replace('{{video_title}}', str(urllib.parse.unquote(video.snippet.title))) + .replace('{{video_title}}', str(html.unescape(video.snippet.title))) .replace('{{video_description}}', str(video.snippet.description)) .replace('{{video_publish_time}}', video.snippet.publishTime.isoformat()) .replace('{{channel_id}}', str(video.snippet.channelId))