gaspa93 / googlemaps-scraper

Google Maps reviews scraping
GNU General Public License v3.0
358 stars 131 forks source link

unexpected keyword argument 'log_level' #28

Open MitunTalapatra opened 2 years ago

MitunTalapatra commented 2 years ago

/googlemaps-scraper/googlemaps.py", line 314, in get_driver input_driver = webdriver.Chrome(executable_path=ChromeDriverManager(log_level=0).install(), options=options) TypeError: init__() got an unexpected keyword argument 'log_level'

LittleBennos commented 1 year ago

Did you resolve this issue?

gaspa93 commented 1 year ago

Hi @MitunTalapatra , I cannot reproduce the error: are you sure to have the correct library versions installed?

abrillo2 commented 1 year ago

replace __get_driver function in googlemaps.py , with this:

def __get_driver(self, debug=False):
    options = Options()

    if not self.debug:
        options.add_argument("--headless")
    else:
        options.add_argument("--window-size=1366,768")

    options.add_argument("--disable-notifications")
    options.add_argument("--lang=en-GB")
    options.binary_location = "pathtochrome/Chrome/Application/chrome.exe"
    input_driver = webdriver.Chrome(executable_path="pathtochromedrive/chromedriver.exe", options=options)

     # click on google agree button so we can continue (not needed anymore)
     # EC.element_to_be_clickable((By.XPATH, '//span[contains(text(), "I agree")]')))
    input_driver.get(GM_WEBPAGE)

    return input_driver