omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.16k stars 104 forks source link

Issue with Google Maps tutorial #30

Closed gameuser1982 closed 5 months ago

gameuser1982 commented 6 months ago

So issue is with the Google Maps tutorial (https://www.omkar.cloud/botasaurus/docs/google-maps-scraping-tutorial/). I don't think anything is wrong with the code (aside from the missing comma on line 57), but I do seem to have issues with Google Maps itself. I'm testing this from Hong Kong using a residential HK ip. My Internet speed is 1Gbps and Google has data centers right in HK so it is usually a very low latency experience not to mention good download speeds on anything hosted by Google. I also have access to a US residential proxy and know how to use botasaurus with it if I need to.

So anyway I fired up the bot built from the tutorial. It's scrolling...., scrolling....., and then after a few times it looks like it's stuck as it's not scrolling anymore. I thought that there was an issue with the bot at first so I terminated it and then opened up a chrome browser in incognito mode prepared to inspect some elements using chrome developer tools.

I go to https://www.google.com/maps/search/restaurants+in+delhi/ and I noticed that it loads after scrolling fine initially (just like with the bot), but after scroll loading several times, I hit a chokepoint where google takes forever to load (just like the bot too). It actually took like 5 to 10 minutes to get through the first chokepoint. The second chokepoint is taking even longer. I've been waiting 30 minutes now to load what is after "Smoke Trailer Grill" but the multi colored circle is still spinning.

Are you experiencing such a phenomena on your end for the "restaurants in delhi" query? I can't see the actual end of the page and am unable to see the element(s) that will indicate to bot that it had reached the end of the page when it's scraping.

Chetan11-dev commented 6 months ago

Tutorial needs to be corrected, if you want to scrape google maps you can use https://github.com/omkarcloud/google-maps-scraper, It handles all these issues.
By the way, this is a known Google Maps Silent Blocking Measures when you scroll too fast. The repo fixes it.

gameuser1982 commented 6 months ago

Thanks! I mainly did the Google Maps scraper to understand botasaurus framework. Happy new year!

Chetan11-dev commented 6 months ago

Happy New Year