You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error : File "a.py", line 71, in
cj = browser_cookie3.chrome()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 1160, in chrome
return Chrome(cookie_file, domain_name, key_file).load()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 626, in init
super().init(browser='Chrome', cookie_file=cookie_file,
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 416, in init
self.__add_key_and_cookie_file(**kwargs)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 431, in __add_key_and_cookie_file
USE_DBUS_LINUX).get_password(os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 232, in get_password
return self.__get_secretstorage_password(os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 247, in __get_secretstorage_password
return self.__methods_map.get('secretstorage')(schema, os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 303, in __get_secretstorage_item_jeepney
with _JeepneyConnection(*args) as connection:
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 195, in enter
self.__connection = open_dbus_connection()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/io/blocking.py", line 341, in open_dbus_connection
bus_addr = get_bus(bus)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/bus.py", line 53, in get_bus
return find_session_bus()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/bus.py", line 42, in find_session_bus
addr = os.environ['DBUS_SESSION_BUS_ADDRESS']
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'DBUS_SESSION_BUS_ADDRESS'
Code:
import browser_cookie3
import requests
cj = browser_cookie3.chrome()
r = requests.get(url, cookies=cj)
get_title(r.content)
Please help!!!!
The text was updated successfully, but these errors were encountered:
Error : File "a.py", line 71, in
cj = browser_cookie3.chrome()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 1160, in chrome
return Chrome(cookie_file, domain_name, key_file).load()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 626, in init
super().init(browser='Chrome', cookie_file=cookie_file,
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 416, in init
self.__add_key_and_cookie_file(**kwargs)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 431, in __add_key_and_cookie_file
USE_DBUS_LINUX).get_password(os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 232, in get_password
return self.__get_secretstorage_password(os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 247, in __get_secretstorage_password
return self.__methods_map.get('secretstorage')(schema, os_crypt_name)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 303, in __get_secretstorage_item_jeepney
with _JeepneyConnection(*args) as connection:
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/browser_cookie3/init.py", line 195, in enter
self.__connection = open_dbus_connection()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/io/blocking.py", line 341, in open_dbus_connection
bus_addr = get_bus(bus)
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/bus.py", line 53, in get_bus
return find_session_bus()
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/site-packages/jeepney/bus.py", line 42, in find_session_bus
addr = os.environ['DBUS_SESSION_BUS_ADDRESS']
File "/home/xuxiaofeng/anaconda3/envs/new_bc2/lib/python3.10/os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'DBUS_SESSION_BUS_ADDRESS'
Code:
import browser_cookie3
import requests
cj = browser_cookie3.chrome()
r = requests.get(url, cookies=cj)
get_title(r.content)
Please help!!!!
The text was updated successfully, but these errors were encountered: