diff --git a/plugins/wolframalpha.py b/plugins/wolframalpha.py index 93292ab..d2b8f37 100644 --- a/plugins/wolframalpha.py +++ b/plugins/wolframalpha.py @@ -22,7 +22,12 @@ def wolframalpha(inp): pod_texts = [] for pod in pods: - heading = pod.find('h1/span').text_content().strip() + heading = pod.find('h1/span') + if heading is not None: + heading = text_content().strip() + else: + continue + results = [] for image in pod.xpath('div/div[@class="output"]/img'): alt = image.attrib['alt'].strip()