mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 03:54:08 +01:00
DDG: show all lines of multiline zeroclick replies
Thanks to @nathan0 for pointing this out.
From: 0b0c1b59ab
This commit is contained in:
parent
f5a53a1965
commit
53318d142c
@ -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 (<br> tags)
|
||||
# Condense newlines (<br> 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')
|
||||
|
Loading…
Reference in New Issue
Block a user