DDG: bugfix for older versions of beautifulsoup4

From: ad0a5dd665
This commit is contained in:
James Lu 2014-12-18 17:21:08 -08:00
parent 41db069581
commit 7b40bd4fdb

View File

@ -75,8 +75,7 @@ class DDG(callbacks.Plugin):
continue continue
try: try:
# 1) Get a result snippet. # 1) Get a result snippet.
snippet = res.parent.next_sibling.next_sibling.find("td", snippet = res.parent.next_sibling.next_sibling.find_all("td")[-1]
class_="result-snippet")
# 2) Fetch the result link. # 2) Fetch the result link.
link = res.a.get('href') link = res.a.get('href')
snippet = snippet.text.strip() snippet = snippet.text.strip()