Search for video tags in RSS body

This commit is contained in:
A git user 2023-08-08 06:43:40 +02:00
parent 01a4c89f91
commit 1d3d0cc18f
No known key found for this signature in database
GPG Key ID: 7920D03B7AA7CD7B

View File

@ -22,6 +22,7 @@ from time import mktime, time
import asyncio
import hashlib
import html
import re
import aiohttp
import attr
@ -117,6 +118,8 @@ class RSSBot(Plugin):
)
msgtype = MessageType.NOTICE if sub.send_notice else MessageType.TEXT
try:
m = re.search(r"<video.*src=[\"']([^\"']*)", entry.summary).group(1)
await self.client.send_markdown(sub.room_id, entry.summary + str(m))
return await self.client.send_markdown(
sub.room_id, message, msgtype=msgtype, allow_html=True
)