From 53318d142cd5cb873247ebe5850b2b7179a12c55 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 20 Jan 2017 21:51:05 -0800 Subject: [PATCH] DDG: show all lines of multiline zeroclick replies Thanks to @nathan0 for pointing this out. From: https://github.com/jlu5/SupyPlugins/commit/0b0c1b59ab71ea22e34e31f22d9874c47ded183a --- plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index 677f4e30d..d63d0f21f 100644 --- a/plugin.py +++ b/plugin.py @@ -164,10 +164,10 @@ class DDG(callbacks.Plugin): item = td.text.split("Zero-click info:", 1)[1].strip() td = td.parent.next_sibling.next_sibling.\ find("td") - # Condense newlines (
tags) + # Condense newlines (
tags). XXX: make these separators configurable. for br in td.find_all('br'): br.replace_with(' - ') - res = td.text.strip().split("\n")[0] + res = ' | '.join(td.text.strip().split("\n")) try: # Some zero-click results have an attached link to them. link = td.a.get('href')