B
B
Boris [A-Z][a-z]+2019-12-12 21:23:50
Python
Boris [A-Z][a-z]+, 2019-12-12 21:23:50

How to enable chrome extension during Selenium?

I use selenium for parsing. I figured out how to connect an extension to it - now the browser visits pages with an extension.
Only there is little sense from this - in order to enable the extension, you must accept the terms of use. How?! It breaks everything for me!
Thanks in advance everyone

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris [AZ][AZ]+, 2019-12-13
@7esoterik7

I got out of the situation by adding my profile

options = webdriver.ChromeOptions()
    options.add_argument('headless')
    options.add_argument('user-data-dir=C:\\Users\\Name_Profile\\AppData\\Local\\Google\\Chrome\\User Data')
    browser = webdriver.Chrome(executable_path=path_to_driver, options=options)
    browser.get(url)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question