Open 212884177 opened 3 weeks ago
这个是说它没找到 "Sign in" 按钮,但是我自己跑没问题。你是不是中文的界面?如果是的话,你得把 "Sign in" 换成 ”登录” 或者什么其他的:
sign_in_button = driver.find_element(By.XPATH, '//*[@aria-label="Sign in"]')
sign_in_button = driver.find_element(By.XPATH, '//*[@aria-label="登录"]')
py cookie_extraction.py Traceback (most recent call last): File "D:\ruanjian\gu\d10\Tiktok-Instagram-Youtube-Snapchat-X-Linkedin-Video-Uploader-master\cookie_extraction.py", line 70, in
main()
File "D:\ruanjian\gu\d10\Tiktok-Instagram-Youtube-Snapchat-X-Linkedin-Video-Uploader-master\cookie_extraction.py", line 65, in main
login_to_youtube_and_save_cookies(driver, Config.youtube_email, Config.youtube_password, Config.youtube_cookies_file)
File "D:\ruanjian\gu\d10\Tiktok-Instagram-Youtube-Snapchat-X-Linkedin-Video-Uploader-master\cookie_extraction.py", line 31, in login_to_youtube_and_save_cookies
sign_in_button = driver.find_element(By.XPATH, '//[@aria-label="Sign in"]')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ruanji\pyy\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 741, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ruanji\pyy\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "C:\ruanji\pyy\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//[@aria-label="Sign in"]"}
(Session info: chrome=129.0.6668.60); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
GetHandleVerifier [0x00786AB3+25587]
(No symbol) [0x00719C54]
(No symbol) [0x00612113]
(No symbol) [0x00656F62]
(No symbol) [0x006571AB]
(No symbol) [0x00697852]
(No symbol) [0x0067ABE4]
(No symbol) [0x00695370]
(No symbol) [0x0067A936]
(No symbol) [0x0064BA73]
(No symbol) [0x0064C4CD]
GetHandleVerifier [0x00A64C63+3032483]
GetHandleVerifier [0x00AB6B99+3368153]
GetHandleVerifier [0x00818F62+624802]
GetHandleVerifier [0x008207DC+655644]
(No symbol) [0x0072260D]
(No symbol) [0x0071F6D8]
(No symbol) [0x0071F875]
(No symbol) [0x00711CA6]
BaseThreadInitThunk [0x75E8FEF9+25]
RtlGetAppContainerNamedObjectPath [0x77507BBE+286]
RtlGetAppContainerNamedObjectPath [0x77507B8E+238]
Exception ignored in: <function Chrome.del at 0x00000173607FD6C0> Traceback (most recent call last): File "C:\ruanji\pyy\Lib\site-packages\undetected_chromedriver__init.py", line 843, in del__ File "C:\ruanji\pyy\Lib\site-packages\undetected_chromedriver__init__.py", line 798, in quit OSError: [WinError 6] 句柄无效。