Commit
·
c60e2e3
1
Parent(s):
68ed806
[Bug]: IndentationError: unindent does not match any outer indentatio… (#1579)
Browse files### What problem does this PR solve?
_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
[Bug]: IndentationError: unindent does not match any outer indentation
level #1569
graph/component/duckduckgo.py
CHANGED
@@ -57,8 +57,8 @@ class DuckDuckGo(ComponentBase, ABC):
|
|
57 |
duck_res = [{"content": '<a href="' + i["url"] + '">' + i["title"] + '</a> ' + i["body"]} for i in
|
58 |
ddgs.news(ans, max_results=self._param.top_n)]
|
59 |
|
60 |
-
|
61 |
-
|
62 |
|
63 |
df = pd.DataFrame(duck_res)
|
64 |
if DEBUG: print(df, ":::::::::::::::::::::::::::::::::")
|
|
|
57 |
duck_res = [{"content": '<a href="' + i["url"] + '">' + i["title"] + '</a> ' + i["body"]} for i in
|
58 |
ddgs.news(ans, max_results=self._param.top_n)]
|
59 |
|
60 |
+
if not duck_res:
|
61 |
+
return DuckDuckGo.be_output("")
|
62 |
|
63 |
df = pd.DataFrame(duck_res)
|
64 |
if DEBUG: print(df, ":::::::::::::::::::::::::::::::::")
|