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
1.21k stars 281 forks source link

Python or SSL error ? #124

Closed mariosire closed 9 months ago

mariosire commented 9 months ago

Description

[Description of the issue]

Code to Reproduce (Paste main.py)


love_it_star_it = '''Love It? Star It! ⭐ https://github.com/omkarcloud/google-maps-scraper/'''

queries = [
   "surf in france"
]

Gmaps.places(queries, max=5)

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

(.venv) mariosire@Marios-MacBook-Pro google-maps-scraper-master % /Users/mariosire/Downloads/google-maps-scraper-master/.venv/bin/python /Use rs/mariosire/Downloads/google-maps-scraper-master/main.py Running [INFO] Downloading Chrome Driver. This is a one-time process. Download in progress... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1344, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1331, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1377, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1326, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1085, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1029, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1472, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1042, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/mariosire/Downloads/google-maps-scraper-master/main.py", line 9, in Gmaps.places(queries, max=5) File "/Users/mariosire/Downloads/google-maps-scraper-master/src/gmaps.py", line 339, in places places_obj = scraper.scrape_places(place_data, cache = use_cache) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/decorators.py", line 650, in wrapper_browser current_result = run_task(data_item, False, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/decorators.py", line 459, in run_task check_and_download_driver() File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/check_and_download_driver.py", line 22, in check_and_download_driver do_download_driver() File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/create_driver_utils.py", line 163, in do_download_driver download_driver() File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/download_driver.py", line 55, in download_driver download_driver_in_path() File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/botasaurus/download_driver.py", line 13, in download_driver_in_path path = chromedriver_autoinstaller.install(path='build/')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/chromedriver_autoinstaller/init.py", line 21, in install chromedriver_filepath = utils.download_chromedriver(path, no_ssl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/chromedriver_autoinstaller/utils.py", line 273, in download_chromedriver chromedriver_version, download_options = get_matched_chromedriver_version(chrome_version, no_ssl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/mariosire/Downloads/google-maps-scraper-master/.venv/lib/python3.12/site-packages/chromedriver_autoinstaller/utils.py", line 222, in get_matched_chromedriver_version latest_version_per_milestone = json.load(urllib.request.urlopen(version_url)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 515, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 532, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1392, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1347, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)> (.venv) mariosire@Marios-MacBook-Pro google-maps-scraper-master %

mariosire commented 9 months ago

Kindly Run python -m pip install botasaurus --upgrade

Run it 2 Times