@@ -55,10 +55,14 @@ def response(resp):
5555
5656 # parse results
5757 for tweet in dom.xpath(results_xpath):
58− link = tweet.xpath(link_xpath)[0]
58+ try:
59+ link = tweet.xpath(link_xpath)[0]
60+ content = extract_text(tweet.xpath(content_xpath)[0])
61+ except Exception:
62+ continue
63+
5964 url = urljoin(base_url, link.attrib.get('href'))
6065 title = extract_text(tweet.xpath(title_xpath))
61− content = extract_text(tweet.xpath(content_xpath)[0])
6266
6367 pubdate = tweet.xpath(timestamp_xpath)
6468 if len(pubdate) > 0: