Python
- 1 ответ
- 0 вопросов
1
Вклад в тег
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
driver = webdriver.Firefox(executable_path="./geckodriver.exe", options=options)
def get_html(url):
driver.get(url)
get_source = driver.page_source
driver.quit()
return get_source
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
def get_html(url):
driver = webdriver.Firefox(executable_path="./geckodriver.exe", options=options)
driver.get(url)
get_source = driver.page_source
driver.quit()
return get_source