Closed tbizelli closed 3 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.
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
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
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
)Terminal Output:
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