From 396c67dc6ccecab0a1b3e5a962db30a5593e6127 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Mon, 27 Feb 2023 18:02:31 +0800 Subject: [PATCH] c --- searx/webapp.py | 575 ++++++++++++++++++++++++++++++++++++++++++++++- searx/webapp1.py | 12 +- 2 files changed, 584 insertions(+), 3 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 212dc8acc..0618c3405 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -781,6 +781,7 @@ def search(): raws = [] try: url_pair = [] + url_proxy = [] prompt = "" for res in results: if 'url' not in res: continue @@ -789,6 +790,7 @@ def search(): if res['content'] == '': continue new_url = 'https://url'+str(len(url_pair)) url_pair.append(res['url']) + url_proxy.append(morty_proxify(res['url'])) res['title'] = res['title'].replace("التغريدات مع الردود بواسطة","") res['content'] = res['content'].replace(" "," ") res['content'] = res['content'].replace("Translate Tweet. ","") @@ -842,7 +844,7 @@ def search(): "logprobs": 0, "stream": True } - gpt = json.dumps({'data':gpt_data, 'url_pair':url_pair, 'raws': raws}) + gpt = json.dumps({'data':gpt_data, 'url_pair':url_pair, 'url_proxy':url_proxy, 'raws': raws}) gpt = '
' + r'''