acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28.01k stars 4.48k forks source link

support for edge browser? #472

Closed keyblade closed 1 year ago

keyblade commented 1 year ago

use edge and set config:

{ "session_token": 'blabla', 'browser_exec_path': 'C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe', 'driver_exec_path': 'F:/edgedriver_win64/msedgedriver.exe', }

error:

Traceback (most recent call last): File "F:\anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 478, in get_cf_cookies browser_executable_path=self.config.get("browser_exec_path") File "F:\anaconda3\lib\site-packages\undetected_chromedriver__init.py", line 439, in init service=service, # needed or the service will be re-created File "F:\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 90, in init keep_alive, File "F:\anaconda3\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 114, in init options=options, File "F:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 288, in init self.start_session(capabilities, browser_profile) File "F:\anaconda3\lib\site-packages\undetected_chromedriver\init__.py", line 694, in start_session capabilities, browser_profile File "F:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 381, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "F:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 444, in execute self.error_handler.check_response(response) File "F:\anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 249, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found Stacktrace: Backtrace: Microsoft::Applications::Events::EventProperties::SetProperty [0x00007FF66EB40A12+15186] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EAD9562+828946] (No symbol) [0x00007FF66E79ED90] (No symbol) [0x00007FF66E808877] (No symbol) [0x00007FF66E807B5E] (No symbol) [0x00007FF66E809655] (No symbol) [0x00007FF66E801D23] (No symbol) [0x00007FF66E7D3B80] (No symbol) [0x00007FF66E7D2B0E] (No symbol) [0x00007FF66E7D4344] Microsoft::Applications::Events::EventProperties::SetProperty [0x00007FF66E9BB190+182768] (No symbol) [0x00007FF66E88EF45] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EA194CA+42362] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EA1C205+53941] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF66ED37E13+1456611] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EAE1ABA+863082] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EAE6BA4+883796] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EAE6CFC+884140] Microsoft::Applications::Events::EventProperty::EventProperty [0x00007FF66EAEFCCE+920958] BaseThreadInitThunk [0x00007FFB76E27614+20] RtlUserThreadStart [0x00007FFB771E26A1+33]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "F:\code\proj\sanic_kb\src\views__init.py", line 4, in from .chatgpt import chatgpt File "F:\code\proj\sanic_kb\src\views\chatgpt.py", line 7, in from src.apps.chatgpt import ask as chatgptask File "F:\code\proj\sanic_kb\src\apps\chatgpt\init.py", line 1, in from .chatgpt import chatgpt_ask File "F:\code\proj\sanic_kb\src\apps\chatgpt\chatgpt.py", line 7, in }, conversation_id=None, parent_id=None) File "F:\anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 77, in init__ self.get_cf_cookies() File "F:\anaconda3\lib\site-packages\revChatGPT\ChatGPT.py", line 490, in get_cf_cookies driver.quit() UnboundLocalError: local variable 'driver' referenced before assignment

edge and edgedriver version: 109.0.1518.55 os: win10 64bit python: 3.7.6 revChatGPT: 0.2.1 selenium: 4.7.2

look into the codes, i see many chrome-related settings of selenium.webdriver. is there will be support of edge?

acheong08 commented 1 year ago

No support for edge. Chromium is preferred