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

Pro version not working in VSCode #133

Closed tbizelli closed 3 months ago

tbizelli commented 4 months ago

Description

After some research, I ran into this google-maps-scraper and tried the free version. Testing a little, I understood that the script fulfilled all my prospectation needs, and I decided to upgrade it to the Pro version in order to have further informations from the scraped data. While using the free scraper, I ran all the tests at VSCode, and all of them correctly outputed the files with the gathered data. Before running the code for the first time, I pip installed all the libraries in the requirements.txt, and the code went smoothly. However, after upgrading the scraper to the Pro version, I became unable to run it from VSCode. I'm currently editing the variables (e.g main.py queries, fields, lang and ammount of scraps) in VSCode, saving it and then running the code in the Command Prompt, and it's working properly.

I'm running the code at my work laptop, which only has Windows as its OS

Code to Reproduce (Paste main.py)


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

queries = [
   "farmácias em campo grande"
]

fields = [
Gmaps.Fields.NAME,
Gmaps.Fields.REVIEWS,
Gmaps.Fields.WEBSITE, 
Gmaps.Fields.EMAILS,
Gmaps.Fields.PHONES,
Gmaps.Fields.MAIN_CATEGORY,
Gmaps.Fields.RATING,
Gmaps.Fields.WORKDAY_TIMING,
Gmaps.Fields.CLOSED_ON,
Gmaps.Fields.PHONE,
Gmaps.Fields.ADDRESS,
Gmaps.Fields.PLUS_CODE,
Gmaps.Fields.DETAILED_ADDRESS,
Gmaps.Fields.TIME_ZONE,
]

Gmaps.places(queries, lang=Gmaps.Lang.Portuguese,fields=fields)

Terminal Output:

Running

DevTools listening on ws://127.0.0.1:54404/devtools/browser/3e0a7164-d68b-4029-8b93-2cf686538d3b
Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

DevTools listening on ws://127.0.0.1:54515/devtools/browser/64242692-2651-4120-a9c2-963d3685c0a0
This time, Google Maps did not get stuck while scrolling and successfully scrolled to the end.
Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

DevTools listening on ws://127.0.0.1:54603/devtools/browser/a472348a-3e32-4035-a6b3-82c095eb704f
This time, Google Maps did not get stuck while scrolling and successfully scrolled to the end.
Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

DevTools listening on ws://127.0.0.1:54711/devtools/browser/6b4db0db-f635-4e58-b736-c68bfce8d753
This time, Google Maps did not get stuck while scrolling and successfully scrolled to the end.
Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 556, in run_task
    result = func(driver, data)
             ^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 354, in scrape_places
    sponsored_links = get_sponsored_links()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\scraper.py", line 229, in get_sponsored_links
    sponsored_links = driver.execute_file('get_sponsored_links.js')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 384, in execute_file
    content = read_file(filename)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\utils.py", line 265, in read_file
    with open(path, 'r', encoding="utf-8") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'get_sponsored_links.js'
Task failed for input: {'query': 'ar condicionado em campo grande', 'is_spending_on_ads': False, 'max': None, 'lang': 'pt', 'geo_coordinates': None, 'zoom': None, 'convert_to_english': True}
Traceback (most recent call last):
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\main.py", line 9, in <module>
    Gmaps.places(queries, lang=Gmaps.Lang.Portuguese,fields=Gmaps.ALL_FIELDS)
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\gmaps.py", line 329, in places
    result_item = process_result(min_reviews, max_reviews, category_in, has_website,can_claim, has_phone, min_rating, max_rating, sort, key, scrape_reviews, reviews_max, reviews_sort, fields, lang, should_scrape_socials, convert_to_english,use_cache,places_obj)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Faro Energy\Downloads\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\gmaps.py", line 181, in process_result
    places = places_obj["places"]
             ~~~~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

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

2024-02-22_15-48-48.zip 2024-02-22_16-00-03.zip 2024-02-22_16-25-39.zip

Chetan11-dev commented 4 months ago

Kindly run python -m pip install botasaurus --upgrade Then, download the pro version again from the pro link and then use it in vscode.

tbizelli commented 4 months ago

I'm still having the same issues:

main.py:

from src import Gmaps

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

queries = [ "escritório de contabilidade em campo grande" ]

fields = [ Gmaps.Fields.NAME, Gmaps.Fields.REVIEWS, Gmaps.Fields.WEBSITE, Gmaps.Fields.EMAILS, Gmaps.Fields.PHONES, Gmaps.Fields.MAIN_CATEGORY, Gmaps.Fields.RATING, Gmaps.Fields.WORKDAY_TIMING, Gmaps.Fields.CLOSED_ON, Gmaps.Fields.PHONE, Gmaps.Fields.ADDRESS, Gmaps.Fields.PLUS_CODE, Gmaps.Fields.DETAILED_ADDRESS, Gmaps.Fields.TIME_ZONE, ]

Gmaps.places(queries, lang=Gmaps.Lang.Portuguese,fields=fields)

Terminal output:

PS C:\Users\Faro Energy\Downloads\Python Dev> & "C:/Users/Faro Energy/AppData/Local/Programs/Python/Python311/python.exe" "c:/Users/Faro Energy/Downloads/Python Dev/google-maps-scraper-pro/omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8/main.py" Running [INFO] Downloading Chrome Driver. This is a one-time process. Download in progress...

DevTools listening on ws://127.0.0.1:51499/devtools/browser/6cfef100-c582-4f9c-8a09-10004c7fd1c2

DevTools listening on ws://127.0.0.1:51511/devtools/browser/1b8f114e-1cad-4f71-bed4-c788ef2b13de Traceback (most recent call last): File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\create_driver_utils.py", line 236, in create_selenium_driver driver = AntiDetectDriver( ^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 33, in init super().init(*args, **kwargs) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in init super().init(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 92, in init super().init( File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 272, in init self.start_session(capabilities, browser_profile) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 364, in start_session response = self.execute(Command.NEW_SESSION, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute self.error_handler.check_response(response) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 122 Current browser version is 121.0.6167.189 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Stacktrace: GetHandleVerifier [0x00F58C93+51395] (No symbol) [0x00EC5EF1] (No symbol) [0x00D7E13A] (No symbol) [0x00DAA021] (No symbol) [0x00DA95DB] (No symbol) [0x00DA54AE] (No symbol) [0x00DA1E29] (No symbol) [0x00DDC655] (No symbol) [0x00DDC1FA] (No symbol) [0x00DD3C26] (No symbol) [0x00DAC629] (No symbol) [0x00DAD40D] GetHandleVerifier [0x012D6453+3711107] GetHandleVerifier [0x0131583A+3970154] GetHandleVerifier [0x01310B28+3950424] GetHandleVerifier [0x01009C99+776393] (No symbol) [0x00ED16C4] (No symbol) [0x00ECC5A8] (No symbol) [0x00ECC759] (No symbol) [0x00EBDD80] BaseThreadInitThunk [0x753F7BA9+25] RtlInitializeExceptionChain [0x776BBD2B+107] RtlClearBits [0x776BBCAF+191]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\Faro Energy\Downloads\Python Dev\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\main.py", line 26, in
Gmaps.places(queries, lang=Gmaps.Lang.Portuguese,fields=fields) File "c:\Users\Faro Energy\Downloads\Python Dev\google-maps-scraper-pro\omkarcloud-google-maps-scraper-pro-0723ed5cee304998d78ba8e5362669418154cba8\src\gmaps.py", line 327, in places
places_obj = scraper.scrape_places(place_data, cache = use_cache) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 650, in wrapper_browser current_result = run_task(data_item, False, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\decorators.py", line 530, in run_task driver = create_selenium_driver(options, desired_capabilities) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\create_driver_utils.py", line 247, in create_selenium_driver return create_selenium_driver( options, desired_capabilities, attempt_download=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\create_driver_utils.py", line 236, in create_selenium_driver driver = AntiDetectDriver( ^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\botasaurus\anti_detect_driver.py", line 33, in init super().init(*args, **kwargs) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in init super().init(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 92, in init super().init( File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 272, in init self.start_session(capabilities, browser_profile) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 364, in start_session response = self.execute(Command.NEW_SESSION, parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute self.error_handler.check_response(response) File "C:\Users\Faro Energy\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 122 Current browser version is 121.0.6167.189 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Stacktrace: GetHandleVerifier [0x00F58C93+51395] (No symbol) [0x00EC5EF1] (No symbol) [0x00D7E13A] (No symbol) [0x00DAA021] (No symbol) [0x00DA95DB] (No symbol) [0x00DA54AE] (No symbol) [0x00DA1E29] (No symbol) [0x00DDC655] (No symbol) [0x00DDC1FA] (No symbol) [0x00DD3C26] (No symbol) [0x00DAC629] (No symbol) [0x00DAD40D] GetHandleVerifier [0x012D6453+3711107] GetHandleVerifier [0x0131583A+3970154] GetHandleVerifier [0x01310B28+3950424] GetHandleVerifier [0x01009C99+776393] (No symbol) [0x00ED16C4] (No symbol) [0x00ECC5A8] (No symbol) [0x00ECC759] (No symbol) [0x00EBDD80] BaseThreadInitThunk [0x753F7BA9+25] RtlInitializeExceptionChain [0x776BBD2B+107] RtlClearBits [0x776BBCAF+191]

But now I'm unable to run the code from the Command Prompt as before

Chetan11-dev commented 4 months ago

Delete build folder Run "python -m pip install botasaurus --upgrade" "python -m pip install botasaurus chromedriver-autoinstaller-fix" Try running it again If still does not works, update chrome and restart pc and try again