mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-27 12:44:19 +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()
|
item = td.text.split("Zero-click info:", 1)[1].strip()
|
||||||
td = td.parent.next_sibling.next_sibling.\
|
td = td.parent.next_sibling.next_sibling.\
|
||||||
find("td")
|
find("td")
|
||||||
# Condense newlines (<br> tags)
|
# Condense newlines (<br> tags). XXX: make these separators configurable.
|
||||||
for br in td.find_all('br'):
|
for br in td.find_all('br'):
|
||||||
br.replace_with(' - ')
|
br.replace_with(' - ')
|
||||||
res = td.text.strip().split("\n")[0]
|
res = ' | '.join(td.text.strip().split("\n"))
|
||||||
try:
|
try:
|
||||||
# Some zero-click results have an attached link to them.
|
# Some zero-click results have an attached link to them.
|
||||||
link = td.a.get('href')
|
link = td.a.get('href')
|
||||||
|
Loading…
Reference in New Issue
Block a user