gosom / google-maps-scraper

scrape data data from Google Maps. Extracts data such as the name, address, phone number, website URL, rating, reviews number, latitude and longitude, reviews,email and more for each place
MIT License
879 stars 120 forks source link

Issue: CSV File Not Displaying Data #81

Open aixart12 opened 4 hours ago

aixart12 commented 4 hours ago

After cloning the repository and navigating to the project directory, I started the web application using the following command:

go run main.go -web

The web app successfully starts at localhost:8080. However, despite multiple attempts and debugging sessions, I am unable to resolve an issue where the CSV file shows no data. The app doesn't throw any errors, and both the CSV file and the SQLite database are created successfully.

Steps to Reproduce:

  1. Clone the repository.
  2. Navigate to the project directory.
  3. Run go run main.go -web.
  4. Check the web app and observe that the CSV file has been created but contains no data.

Expected Behavior: The CSV file should contain data as expected when interacting with the web app.

Actual Behavior: The CSV file is created, but it is empty. No errors are shown in the logs or console output.

Screenshots:

Environment:

Additional Information:

Any help in resolving this issue would be greatly appreciated!

image image image

gosom commented 3 hours ago

thanks for the report.

I think it's because I set the exit on inactiviy to 20s and the crawler takes some time to start.

I am increasing to 3m and releasing a new version

gosom commented 3 hours ago

@aixart12 a new version is released with the fix.

Will you mind to check again and close the issue if it's resolved also in windows?

aixart12 commented 2 hours ago

@gosom , I'm running the app locally on Windows using WSL (Ubuntu 24.04), but when I try to run it again, I'm still encountering the same issue. Is there something I might be missing to run the web app properly?

Also, I downloaded the .exe file from GitHub, but it gets stuck on a black screen. image

gosom commented 2 hours ago

how you started the app?

aixart12 commented 2 hours ago

go run main.go -web

gosom commented 2 hours ago

no from the exe file, I assume similarly right?

aixart12 commented 2 hours ago

to run .exe file I am just running it like any other file , jut double click it .

gosom commented 2 hours ago

this won't work and the behavior is expected. you need to start from the command line and use the -web flag.

But, I believe probably it should start by default in web mode.

can you try that and let me know?

aixart12 commented 2 hours ago

@gosom, it worked with the command:

.\google_maps_scraper-1.4.2-windows-amd64.exe -web

This time, I also got results in the CSV file.

However, I noticed that if I cancel the app during the scraping process, the job status remains as 'working' even though no job is actually running.

And Also Could you help me understand why I'm unable to run the app through the code?

image

gosom commented 2 hours ago

However, I noticed that if I cancel the app during the scraping process, the job status remains as 'working' even though no job is actually running.

Yes this is expected behavior. There is no way to restart or remove at the moment.

this should work through the code. However I don't know via WSL.

Have you tried the docker container?