Unescape HTML, make announcement task run every 10 min instead of every 30

pull/45/head
Stijn De Clercq 2021-03-12 10:05:19 +01:00
parent 4477ec6c0b
commit 1979703194
2 changed files with 3 additions and 2 deletions

View File

@ -240,7 +240,7 @@ class Tasks(commands.Cog):
async def beforeUpdateMatchweek(self):
await self.client.wait_until_ready()
@tasks.loop(minutes=30.0)
@tasks.loop(minutes=10.0)
async def uforaAnnouncements(self):
"""
Task that checks for new Ufora announcements every few minutes

View File

@ -2,6 +2,7 @@ from datetime import datetime, timedelta
from discord import Embed, Colour
from functions.stringFormatters import leadingZero as lz
from functions.timeFormatters import intToWeekday
from html import unescape
import pytz
import re
@ -78,7 +79,7 @@ class UforaNotification:
text = text.replace(key, value)
# Remove HTML tags
return re.sub(r"<[^>]*>", "", text)
return unescape(re.sub(r"<[^>]*>", "", text))
def _get_published(self):
time_string = "%a, %d %b %Y %H:%M:%S %Z"