fengx1a0 / Bilibili_show_ticket_auto_order

352 stars 88 forks source link

最新release登录失败 #39

Closed Wesley-Young closed 1 year ago

Wesley-Young commented 1 year ago

之前登录过一次,下载了v1.6.1之后,此前的user_data.json被覆盖,重新登录,出现以下错误

Traceback (most recent call last): File "C:\debug\bilibili-show-ticket-auto-order\login.py", line 50, in get_login() File "C:\debug\bilibili-show-ticket-auto-order\login.py", line 39, in get_login username = WebDriver.find_element(By.CLASS_NAME, "home-top-msg-name").text ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 740, in find_element return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute self.error_handler.check_response(response) File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".home-top-msg-name"} (Session info: MicrosoftEdge=114.0.1823.79); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: Backtrace: GetHandleVerifier [0x00007FF63D98AEC2+64226] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D91C082+765362] (No symbol) [0x00007FF63D6DCC4C] (No symbol) [0x00007FF63D720BDF] (No symbol) [0x00007FF63D720D6A] (No symbol) [0x00007FF63D75AC17] (No symbol) [0x00007FF63D73F03F] (No symbol) [0x00007FF63D714BB1] (No symbol) [0x00007FF63D757FC1] (No symbol) [0x00007FF63D73EDD3] (No symbol) [0x00007FF63D713BEC] (No symbol) [0x00007FF63D712DD6] (No symbol) [0x00007FF63D714364] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF63DB687C9+1319033] (No symbol) [0x00007FF63D78D2A8] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D8695E1+33553] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D861A1F+1871] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF63DB673E3+1313939] Microsoft::Applications::Events::ILogConfiguration::operator [0x00007FF63D9246B8+20232] Microsoft::Applications::Events::ILogConfiguration::operator [0x00007FF63D920CD4+5412] Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF63D920DCC+5660] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D914A81+735153] BaseThreadInitThunk [0x00007FFDBF0826AD+29] RtlUserThreadStart [0x00007FFDC0AEAA68+40]

fengx1a0 commented 1 year ago

之前登录过一次,下载了v1.6.1之后,此前的user_data.json被覆盖,重新登录,出现以下错误

Traceback (most recent call last): File "C:\debug\bilibili-show-ticket-auto-order\login.py", line 50, in get_login() File "C:\debug\bilibili-show-ticket-auto-order\login.py", line 39, in get_login username = WebDriver.find_element(By.CLASS_NAME, "home-top-msg-name").text ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 740, in find_element return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute self.error_handler.check_response(response) File "C:\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".home-top-msg-name"} (Session info: MicrosoftEdge=114.0.1823.79); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: Backtrace: GetHandleVerifier [0x00007FF63D98AEC2+64226] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D91C082+765362] (No symbol) [0x00007FF63D6DCC4C] (No symbol) [0x00007FF63D720BDF] (No symbol) [0x00007FF63D720D6A] (No symbol) [0x00007FF63D75AC17] (No symbol) [0x00007FF63D73F03F] (No symbol) [0x00007FF63D714BB1] (No symbol) [0x00007FF63D757FC1] (No symbol) [0x00007FF63D73EDD3] (No symbol) [0x00007FF63D713BEC] (No symbol) [0x00007FF63D712DD6] (No symbol) [0x00007FF63D714364] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF63DB687C9+1319033] (No symbol) [0x00007FF63D78D2A8] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D8695E1+33553] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D861A1F+1871] Microsoft::Applications::Events::ILogManager::DispatchEventBroadcast [0x00007FF63DB673E3+1313939] Microsoft::Applications::Events::ILogConfiguration::operator [0x00007FF63D9246B8+20232] Microsoft::Applications::Events::ILogConfiguration::operator [0x00007FF63D920CD4+5412] Microsoft::Applications::Events::ILogConfiguration::operator* [0x00007FF63D920DCC+5660] Microsoft::Applications::Events::EventProperty::~EventProperty [0x00007FF63D914A81+735153] BaseThreadInitThunk [0x00007FFDBF0826AD+29] RtlUserThreadStart [0x00007FFDC0AEAA68+40]

我从1.4开始就没更新过login.py和login.exe登录相关代码,可能是你网卡了没加载出来,你把user_data删了再试一下

Wesley-Young commented 1 year ago

hmm 问题已经解决 我的情况是 因为某些原因 正常登录不能验证手机号 然后连续多次使用QQ登录 然后从第二次QQ登录开始就一直失败 最后一次用的是扫码登录 成功获取了相关数据 虽然但是,感谢及时回复