[英]Selenium Webdriver Issue w/ Chrome in Python: Traceback Errors & Can't Determine Loading Status
[英]Can't fix this traceback(python webdriver)
from bs4 import BeautifulSoup
from selenium.webdriver.chrome.options import Options
import requests
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(options=chrome_options, executable_path=r'C:\bin\chromedriver.exe')
options = webdriver.ChromeOptions()
driver.get('https://rocket-league.com/trade/edit?trade=*********')
url = 'https://rocket-league.com/trade/edit?trade=*********'
login = 'email'
password = 'password'
s = requests.Session()
r = s.get(url, auth=(login, password))
edit = driver.find_element_by_css_selector('.rlg-btn-primary')
edit.click()
DevTools listening on ws://127.0.0.1:61790/devtools/browser/2a14f9a0-c219-4f80-b3a9-cb7faecb1805
[0722/013746.738:INFO:CONSOLE(1)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio", source: https://rocket-league.com/scripts/ffp-aws.js (1)
Traceback (most recent call last):
File "c:/Users/OdMensss/Desktop/parse.py", line 21, in <module>
edit.click()
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (1077, 17)
(Session info: headless chrome=84.0.4147.89)
PS C:\Users\OdMensss> [0722/013750.291:INFO:CONSOLE(0)] "Access to fetch at 'https://tracker.databrain.com/fp/rc.ashx?d=22093287&z=3&s=800600&b=33&v=622178458&e=0&i=0&p=0&h=4&pt=Win32&is=0&as=48002&jsf=0' from origin 'https://rocket-league.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.", source: https://rocket-league.com/login (0)
[0722/013750.292:INFO:CONSOLE(0)] "Uncaught (in promise) TypeError: Failed to fetch", source: https://rocket-league.com/login (0)
我想為我的交易創建自動刷新器,但我不使用 Python。 請幫幫我。 腳本只需點擊“編輯交易”按鈕即可。 但首先他應該登錄網站
from bs4 import BeautifulSoup
from selenium.webdriver.chrome.options import Options
import requests
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = webdriver.Chrome(options=chrome_options, executable_path=r'C:\bin\chromedriver.exe')
options = webdriver.ChromeOptions()
driver.get('https://rocket-league.com/trade/edit?trade=*********')
url = 'https://rocket-league.com/trade/edit?trade=*********'
login = 'email'
password = 'password'
s = requests.Session()
r = s.get(url, auth=(login, password))
edit = driver.find_element_by_css_selector('.rlg-btn-primary')
edit.click()
DevTools listening on ws://127.0.0.1:61790/devtools/browser/2a14f9a0-c219-4f80-b3a9-cb7faecb1805
[0722/013746.738:INFO:CONSOLE(1)] "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio", source: https://rocket-league.com/scripts/ffp-aws.js (1)
Traceback (most recent call last):
File "c:/Users/OdMensss/Desktop/parse.py", line 21, in <module>
edit.click()
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\OdMensss\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (1077, 17)
(Session info: headless chrome=84.0.4147.89)
PS C:\Users\OdMensss> [0722/013750.291:INFO:CONSOLE(0)] "Access to fetch at 'https://tracker.databrain.com/fp/rc.ashx?d=22093287&z=3&s=800600&b=33&v=622178458&e=0&i=0&p=0&h=4&pt=Win32&is=0&as=48002&jsf=0' from origin 'https://rocket-league.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.", source: https://rocket-league.com/login (0)
[0722/013750.292:INFO:CONSOLE(0)] "Uncaught (in promise) TypeError: Failed to fetch", source: https://rocket-league.com/login (0)
我想為我的交易創建自動刷新器,但我不使用 Python。 請幫幫我。 腳本只需點擊“編輯交易”按鈕即可。 但首先他應該登錄網站
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.