googlemaps-scraper icon indicating copy to clipboard operation
googlemaps-scraper copied to clipboard

Support Initial place map url

Open SulimanLab opened this issue 4 years ago • 2 comments

Hello, is there a plan for supporting Initial place map url rather than clicking on reviews button.

the idea is i want to automate the whole extraction operation without human intervention (clicking on reviews).

SulimanLab avatar Nov 29 '20 22:11 SulimanLab

Hi @SulimanLab,

yes it is feasible: basically if you start from initial place map, you have to implement one more click. In doing so, you have also to take into account some exceptions, such as no review available, so for now I am not planning to do it because I can add it in the next steps. Thank you for your feedback, and if you want to proactively collaborate to develop this part, I appreciate a lot.

gaspa93 avatar Dec 05 '20 18:12 gaspa93

In googlempas.py, under get_acount, I changed:

    self.driver.get(url)
   

to:

    self.driver.get(url)
    time.sleep(2)

    self.driver.find_elements_by_xpath('//*[@id="QA0Szd"]/div/div/div[1]/div[2]/div/div[1]/div/div/div[2]/div[1]/div[1]/div[2]/div/div[1]/div[2]').click()
    

and now I can use initial place map urls.

stajdini avatar Feb 28 '23 04:02 stajdini