diff --git a/couchpotato/core/helpers/rss.py b/couchpotato/core/helpers/rss.py index b0a92315..582d38ac 100644 --- a/couchpotato/core/helpers/rss.py +++ b/couchpotato/core/helpers/rss.py @@ -19,7 +19,7 @@ class RSS(object): def getElements(self, xml, path): - elements = [] + elements = None try: elements = xml.findall(path) except: @@ -27,6 +27,14 @@ class RSS(object): return elements + def getElement(self, xml, path): + ''' Find element and return text''' + + try: + return xml.find(path) + except: + return + def getTextElement(self, xml, path): ''' Find element and return text'''