summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Bing.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-02 03:03:10 +0200
committerGitHub <noreply@github.com>2023-09-02 03:03:10 +0200
commit9de43a0e95aa0a4cb41caaec11573e74aad117c9 (patch)
tree5dcde56297e9dc0d2645412a7a660553445d45aa /g4f/Provider/Bing.py
parent~ (diff)
parentUpdate readme (diff)
downloadgpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.gz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.bz2
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.lz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.xz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.zst
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.zip
Diffstat (limited to 'g4f/Provider/Bing.py')
-rw-r--r--g4f/Provider/Bing.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py
index c31ba5a7..48968e39 100644
--- a/g4f/Provider/Bing.py
+++ b/g4f/Provider/Bing.py
@@ -26,32 +26,15 @@ class Bing(AsyncGeneratorProvider):
prompt = messages[-1]["content"]
context = create_context(messages[:-1])
- if cookies:
+ if cookies and "SRCHD" in cookies:
#TODO: Will implement proper cookie retrieval later and use a try-except mechanism in 'stream_generate' instead of defaulting the cookie value like this
cookies_dict = {
- 'MUID' : '',
- 'BCP' : '',
- 'MUIDB' : '',
- 'USRLOC' : '',
- 'SRCHD' : 'AF=hpcodx',
- 'MMCASM' : '',
- '_UR' : '',
- 'ANON' : '',
- 'NAP' : '',
- 'ABDEF' : '',
+ 'SRCHD' : cookies["SRCHD"],
'PPLState' : '1',
'KievRPSSecAuth': '',
- '_U' : '',
'SUID' : '',
- '_EDGE_S' : '',
- 'WLS' : '',
- '_HPVN' : '',
- '_SS' : '',
- '_clck' : '',
'SRCHUSR' : '',
- '_RwBf' : '',
'SRCHHPGUSR' : '',
- 'ipv6' : '',
}
return stream_generate(prompt, context, cookies_dict)