亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何通過 Selenium 和 Python 將文本發送到 Instagram 中的用戶名和密碼字段

如何通過 Selenium 和 Python 將文本發送到 Instagram 中的用戶名和密碼字段

郎朗坤 2021-09-11 20:06:45
我收到了一個 python 程序的錯誤消息,它們是:   C:\Users\chanm\AppData\Local\Programs\Python\Python37-32\python.exe C:/Users/chanm/OneDrive/Desktop/bot/Commenter.py    Traceback (most recent call last):      File "C:/Users/chanm/OneDrive/Desktop/bot/Commenter.py", line 133, in <module>        com.login()      File "C:/Users/chanm/OneDrive/Desktop/bot/Commenter.py", line 28, in login        login_button = driver.find_element_by_xpath("//a[@href='/accounts/login/']")      File "C:\Users\chanm\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath        return self.find_element(by=By.XPATH, value=xpath)      File "C:\Users\chanm\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element        'value': value})['value']      File "C:\Users\chanm\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute        self.error_handler.check_response(response)      File "C:\Users\chanm\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response        raise exception_class(message, screen, stacktrace)    selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[@href='/accounts/login/']"}      (Session info: chrome=71.0.3578.80)      (Driver info: chromedriver=2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90),platform=Windows NT 10.0.17134 x86_64)Process finished with exit code 1這就是我遇到的最多問題的腳本我嘗試過更改擴展和其他小問題的方法,它解決了大多數問題,現在我堅持使用這些問題
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 191 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號