Skip to content

Commit

Permalink
Return html_response only if display is True
Browse files Browse the repository at this point in the history
  • Loading branch information
tronikos committed Dec 30, 2022
1 parent 8385847 commit fca6adb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gassist-text"
version = "0.0.6"
version = "0.0.7"
authors = [
{ name="tronikos", email="tronikos@gmail.com" },
]
Expand Down
5 changes: 3 additions & 2 deletions src/gassist_text/textinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ def iter_assist_requests():
self.deadline):
assistant_helpers.log_assist_response_without_audio(resp)
if resp.screen_out.data:
html_response = resp.screen_out.data
soup = BeautifulSoup(html_response, "html.parser")
if self.display:
html_response = resp.screen_out.data
soup = BeautifulSoup(resp.screen_out.data, "html.parser")
divs = soup.find_all("div", class_="show_text_content")
text_response = '\n'.join(map(lambda div : div.text, divs))
if resp.dialog_state_out.conversation_state:
Expand Down

0 comments on commit fca6adb

Please sign in to comment.