From be3112197b801b718abff03877dfa5c112c1c6b0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 14 Dec 2014 20:00:43 -0800 Subject: [PATCH] DDG: bugfix From: https://github.com/jlu5/SupyPlugins/commit/ad8931ad73d7ebe9f8c7a9460faaf00dba2ea1d4 --- plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index d44718294..48acd4e25 100644 --- a/plugin.py +++ b/plugin.py @@ -76,8 +76,9 @@ class DDG(callbacks.Plugin): tables = soup.find_all('table') # Sometimes there is an extra table for page navigation - webresults = tables[2].find_all('tr') - if not webresults: + try: + webresults = tables[2].find_all('tr') + except IndexError: webresults = tables[1].find_all('tr') if webresults: try: