Trim remaining characters
This commit is contained in:
parent
7e858de0d4
commit
2213246de9
1 changed files with 3 additions and 2 deletions
|
@ -64,6 +64,7 @@ class Completion:
|
||||||
text = response.text.split('}]}\n\nevent: youChatToken\ndata: {"youChatToken": "')[-1]
|
text = response.text.split('}]}\n\nevent: youChatToken\ndata: {"youChatToken": "')[-1]
|
||||||
text = text.replace('"}\n\nevent: youChatToken\ndata: {"youChatToken": "', '')
|
text = text.replace('"}\n\nevent: youChatToken\ndata: {"youChatToken": "', '')
|
||||||
text = text.replace('event: done\ndata: I\'m Mr. Meeseeks. Look at me.\n\n', '')
|
text = text.replace('event: done\ndata: I\'m Mr. Meeseeks. Look at me.\n\n', '')
|
||||||
|
text = text[:-4] # trims '"}', along with the last two remaining newlines
|
||||||
|
|
||||||
extra = {
|
extra = {
|
||||||
'youChatSerpResults' : loads(youChatSerpResults),
|
'youChatSerpResults' : loads(youChatSerpResults),
|
||||||
|
|
Loading…
Reference in a new issue