Selenium에서 헤드리스 Firefox를 실행하려고합니다. 내 코드는 다음과 같습니다 :firefox 헤드리스 문제 실행
selenium.webdriver.firefox.options import Options
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.add_argument('--headless')
options.add_argument('--hide-scrollbars')
options.add_argument('--disable-gpu')
driver = webdriver.firefox(firefox_options = options)
driver.get('https://wtfismyip.com')
print(driver.find_element_by_tag_name('body').text)
그것은 나를주는 유지 :
driver = webdriver.firefox(firefox_options = options)
TypeError: 'module' object is not callable
나는 크롬 아무 문제가 없었습니다.
같은 문제가 계속 발생합니다. | –
그는 파이어 폭스의 자본 F에 대해 언급했다. –
@ShubhamJain 그것은 효과가 있었다. 아야!! 그것은 20 % 더 많은 CPU를 사용합니다 !!! 그것은 적은 머리를 사용하지 않는 CPU를 사용합니다. Chrome이 10 %를 절약했습니다. –