omkarcloud / google-maps-scraper

👋 HOLA 👋 HOLA 👋 HOLA ! ENJOY OUR GOOGLE MAPS SCRAPER 🚀 TO EFFORTLESSLY EXTRACT DATA SUCH AS NAMES, ADDRESSES, PHONE NUMBERS, REVIEWS, WEBSITES, AND RATINGS FROM GOOGLE MAPS WITH EASE! 🤖
https://www.omkar.cloud/
MIT License
863 stars 211 forks source link

Scrape Reviews by a google maps place link does not work #111

Closed YetkinMesutKaraman closed 5 months ago

YetkinMesutKaraman commented 5 months ago

Description

I tried to scrape reviews from a place link but extract_data() method fails. Reason comes from parse(data) method probably.

os: macOS Sonoma 14.2.1 chrome version: Version 121.0.6167.85 (Official Build) (arm64)

Code to Reproduce (Paste main.py)

from src.gmaps import Gmaps

links = [
    "https://www.google.com/maps/place/%CE%93%CE%B9%CE%B1+%CE%94%CE%B5%CF%82/@38.020513,23.743313,17.2z/data=!4m15!1m8!3m7!1s0x14a1a29214af57a7:0xfb433e62e837baec!2sChalepa+43,+Athina+111+41!3b1!8m2!3d38.0193376!4d23.7439683!16s%2Fg%2F11kmcr92q0!3m5!1s0x14a1a28e00b9323f:0x1cf0d86aab9a62f0!8m2!3d38.0202201!4d23.7455106!16s%2Fg%2F11ckvgvhnl?authuser=0&entry=ttu",
]
output_folder = "my-awesome-places"

Gmaps.links(
    links,
    output_folder,
    use_cache=False,
    scrape_reviews=True,
    max_reviews=70,
    max=3,
)

Zip and Upload the error_log/ Folder (Optional, if there are errors)

Chetan11-dev commented 5 months ago

I think there is an issue with link, How did you obtain the link, I tries following code which worked:

from src.gmaps import Gmaps

links = [
    "https://www.google.com/maps/place/SEOTUG/data=!4m7!3m6!1s0x390d19fbf7081033:0xaecd7b4c5dfe13c7!8m2!3d28.5005705!4d77.0291595!16s%2Fg%2F12nqgnvnl!19sChIJMxAI9_sZDTkRxxP-XUx7za4?authuser=0&hl=en&rclk=1",
]
output_folder = "my-awesome-places"

Gmaps.links(
    links,
    output_folder,
    use_cache=False,
    scrape_reviews=True,
   #  max_reviews=70,
    max=3,
)
YetkinMesutKaraman commented 5 months ago

It was a restaurant in Greece. Its name includes Greek letters. You can click to see. Is this an edge case? What was the root cause?

Chetan11-dev commented 5 months ago

I am not Sure, but I know that if the restaurant link must come from the tool then it works.