DDG: bugfix

From: ad8931ad73
This commit is contained in:
James Lu 2014-12-14 20:00:43 -08:00 committed by GLolol
parent f627837496
commit be3112197b
1 changed files with 3 additions and 2 deletions

View File

@ -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: