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

Exception: Unable to load Google #117

Closed Nneji123 closed 4 months ago

Nneji123 commented 5 months ago

Description

I am trying to use the scraper but I get an error saying unable to load google. In the error logs the screenshot shows a captcha solver so I guess that's what causing the issue. How do I resolve it?

Traceback (most recent call last):
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\venv\Lib\site-packages\botasaurus\decorators.py", line 371, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\api\scrapers\gmapscraper\src\scraper.py", line 287, in scrape_places
    perform_visit(driver, search_link)
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\api\scrapers\gmapscraper\src\scraper_utils.py", line 26, in perform_visit
    visit_gmap_with_consent()
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\api\scrapers\gmapscraper\src\scraper_utils.py", line 6, in visit_gmap_with_consent
    driver.organic_get(link, accept_cookies=True)
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\venv\Lib\site-packages\botasaurus\anti_detect_driver.py", line 325, in organic_get
    return self.google_get(link, wait, accept_cookies)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\venv\Lib\site-packages\botasaurus\anti_detect_driver.py", line 330, in google_get
    accept_google_cookies(self)
  File "C:\Users\IFEANYI PC\Documents\Programming\Projects\VibebyteMedia\scraping-backend\venv\Lib\site-packages\botasaurus\accept_google_cookies.py", line 25, in accept_google_cookies
    raise Exception("Unabe to load Google")
Exception: Unabe to load Google

screenshot

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

<html><head><meta http-equiv="origin-trial" content="Az520Inasey3TAyqLyojQa8MnmCALSEU29yQFW8dePZ7xQTvSt73pHazLFTK5f7SyLUJSo2uKLesEtEa9aUYcgMAAACPeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IkRpc2FibGVUaGlyZFBhcnR5U3RvcmFnZVBhcnRpdGlvbmluZyIsImV4cGlyeSI6MTcyNTQwNzk5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://www.google.com/</title></head>
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px; overscroll-behavior:contain;" onload="e=document.getElementById('captcha');if(e){e.focus();} if(solveSimpleChallenge) {solveSimpleChallenge(,);}">
<div style="max-width:400px;">
<hr noshade="" size="1" style="color:#ccc; background-color:#ccc;"><br>
<form id="captcha-form" action="index" method="post">
<noscript>
<div style="font-size:13px;">
  In order to continue, please enable javascript on your web browser.
</div>
</noscript>
<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/releases/QUpyTKFkX5CIV6EF8TFSWEif/recaptcha__en.js" crossorigin="anonymous" integrity="sha384-HnkerJsLyalkcFDn1vvM1kKUZMkwUvDrIpsHIedgEsFGfS1je/edYQdSxlL+exWI"></script><script src="https://www.google.com/recaptcha/api.js" async="" defer=""></script>
<script>var submitCallback = function(response) {document.getElementById('captcha-form').submit();};</script>
<div id="recaptcha" class="g-recaptcha" data-sitekey="6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b" data-callback="submitCallback" data-s="0YwjjQUCvRvlIIL8qSOzzIJS20QdTg09PFLD5J2aITyQJzy6eAQ5zNpAyfKYfpgbqsjfPumTZI-Ycbv7fHP0-VyeOTo44m3Jxl7hbZmVQJ_eylBDYPugYYeK-TIOCPf_-Uh-hkYC5NBweh5i7KWzPozPFmT62n20fVa0VVQ2-UBKe91MizhoG0GXWTsFklzpXFceaeAoyH00wZa5e8_bB_B5vecs08fa-sy11FaXdZjfzU1J1qXB99p2lrFDEcIzxzzUoRf7_6o-QrBjhr4"><div style="width: 304px; height: 78px;"><div><iframe title="reCAPTCHA" width="304" height="78" role="presentation" name="a-pt4do7r6kpl0" frameborder="0" scrolling="no" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox allow-storage-access-by-user-activation" src="https://www.google.com/recaptcha/api2/anchor?ar=1&amp;k=6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b&amp;co=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbTo0NDM.&amp;hl=en&amp;v=QUpyTKFkX5CIV6EF8TFSWEif&amp;size=normal&amp;s=0YwjjQUCvRvlIIL8qSOzzIJS20QdTg09PFLD5J2aITyQJzy6eAQ5zNpAyfKYfpgbqsjfPumTZI-Ycbv7fHP0-VyeOTo44m3Jxl7hbZmVQJ_eylBDYPugYYeK-TIOCPf_-Uh-hkYC5NBweh5i7KWzPozPFmT62n20fVa0VVQ2-UBKe91MizhoG0GXWTsFklzpXFceaeAoyH00wZa5e8_bB_B5vecs08fa-sy11FaXdZjfzU1J1qXB99p2lrFDEcIzxzzUoRf7_6o-QrBjhr4&amp;cb=tnr01unkqm3a"></iframe></div><textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea></div><iframe style="display: none;"></iframe></div>

<input type="hidden" name="q" value="EgTF0z2PGPPN4K0GIimZh3ZDh-znOTiQA_MzPI1qrUjt9xQCDmVkuDBU5mkTx-lNT9Ke3mkedTIBcloBQw"><input type="hidden" name="continue" value="https://www.google.com/">
</form>
<hr noshade="" size="1" style="color:#ccc; background-color:#ccc;">

<div style="font-size:13px;">
<b>About this page</b><br><br>

Our systems have detected unusual traffic from your computer network.  This page checks to see if it's really you sending the requests, and not a robot.  <a href="#" onclick="document.getElementById('infoDiv').style.display='block';">Why did this happen?</a><br><br>

<div id="infoDiv" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop.  In the meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests.  If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible.  <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.
</div>

IP address: 197.211.61.143<br>Time: 2024-01-29T22:30:12Z<br>URL: https://www.google.com/<br>
</div>
</div>

<div style="background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 3px; position: absolute; transition: visibility 0s linear 0.3s, opacity 0.3s linear 0s; opacity: 0; visibility: hidden; z-index: 2000000000; left: 0px; top: -10000px;"><div style="width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 2000000000; background-color: rgb(255, 255, 255); opacity: 0.05;"></div><div class="g-recaptcha-bubble-arrow" style="border: 11px solid transparent; width: 0px; height: 0px; position: absolute; pointer-events: none; margin-top: -11px; z-index: 2000000000;"></div><div class="g-recaptcha-bubble-arrow" style="border: 10px solid transparent; width: 0px; height: 0px; position: absolute; pointer-events: none; margin-top: -10px; z-index: 2000000000;"></div><div style="z-index: 2000000000; position: relative;"><iframe title="recaptcha challenge expires in two minutes" name="c-pt4do7r6kpl0" frameborder="0" scrolling="no" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals allow-popups-to-escape-sandbox allow-storage-access-by-user-activation" src="https://www.google.com/recaptcha/api2/bframe?hl=en&amp;v=QUpyTKFkX5CIV6EF8TFSWEif&amp;k=6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b" style="width: 100%; height: 100%;"></iframe></div></div></body></html>