[RSS] Account for aiohttp fetch failure

This commit is contained in:
aikaterna
2020-10-06 16:29:58 -07:00
committed by GitHub
parent 3b38c5293e
commit 65bd1386cc

View File

@@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType
log = logging.getLogger("red.aikaterna.rss")
__version__ = "1.1.18"
__version__ = "1.1.19"
class RSS(commands.Cog):
@@ -314,6 +314,9 @@ class RSS(commands.Cog):
async def _fetch_feedparser_object(self, url: str):
"""Get all feedparser entries from a url."""
html = await self._get_url_content(url)
if not html:
return None
feedparser_obj = feedparser.parse(html)
if feedparser_obj.bozo: