From 5ed417138a5a8d138d86613dc7f779445729f8b2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 16 Oct 2020 21:46:34 +0100 Subject: [PATCH] Quick check for hashtags --- newswire.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newswire.py b/newswire.py index fc07eca2..40a33c12 100644 --- a/newswire.py +++ b/newswire.py @@ -55,6 +55,8 @@ def rss2Footer() -> str: def getNewswireTags(text: str) -> []: """Returns a list of hashtags found in the given text """ + if '#' not in text: + return [] if ' ' not in text: return [] textSimplified = \