From 011d0babc265acfe35927c898a276ce8b9a261f3 Mon Sep 17 00:00:00 2001 From: "t.me/xtekky" <98614666+xtekky@users.noreply.github.com> Date: Thu, 27 Apr 2023 19:26:36 +0100 Subject: remove phind --- you/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'you/__init__.py') diff --git a/you/__init__.py b/you/__init__.py index 6925e79f..8bf31f0d 100644 --- a/you/__init__.py +++ b/you/__init__.py @@ -57,8 +57,7 @@ class Completion: r'(?<=event: youChatSerpResults\ndata:)(.*\n)*?(?=event: )', response.text ).group() third_party_search_results = re.search( - r'(?<=event: thirdPartySearchResults\ndata:)(.*\n)*?(?=event: )', response.text - ).group() + r'(?<=event: thirdPartySearchResults\ndata:)(.*\n)*?(?=event: )', response.text).group() # slots = findall(r"slots\ndata: (.*)\n\nevent", response.text)[0] text = ''.join(re.findall(r'{\"youChatToken\": \"(.*?)\"}', response.text)) @@ -69,7 +68,7 @@ class Completion: } return { - 'response': text.replace('\\n', '\n').replace('\\\\', '\\'), + 'response': text.replace('\\n', '\n').replace('\\\\', '\\').replace('\\"', '"'), 'links': loads(third_party_search_results)['search']['third_party_search_results'] if include_links else None, -- cgit v1.2.3