summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Bing.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-01 23:39:57 +0200
committerHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-01 23:39:57 +0200
commit3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471 (patch)
treecc45ace1412c64677eba834ba60d73b03973d195 /g4f/Provider/Bing.py
parent~ (diff)
downloadgpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar.gz
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar.bz2
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar.lz
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar.xz
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.tar.zst
gpt4free-3e6b1d6bef04881d8f46ab06331b5e3c5e2e3471.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)