gosom / gosom/google-maps-scraper

Guide to Running Web Interface on AWS EC2

Open
#87 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
5.9k
Forks
924
Avg merge
5d 13h
Merged PRs (30d)
3

Description

I managed to get this thing working via AWS EC2! YAY! I decided to write a little guide on it.

First thing is you launch an Ubuntu Server 24.04 LTS instance, I use a t2.xlarge ($0.18 per hour) (you can turn it off when you're not using it to save money) with 25 GB of storage.
![guide to creating google web scraper instance](https://github.com/user-attachments/assets/cc529247-2852-437a-b9b1-c4217706db51)

Then you connect to the instance. Using EC2 Instance Connect with default username is fine.

Here are the commands you have to run:

`git clone https://github.com/gosom/google-maps-scraper.git`

`sudo apt install golang-go`

`sudo apt-get update`

`sudo apt install golang-go`

`sudo apt-get install libatk1.0-0 libatk-bridge2.0-0 libcups2 libatspi2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 liboss4-salsa-asound2`

`sudo apt-get install liboss4-salsa-asound2`

`sudo apt-get update`

`sudo apt-get upgrade`

`sudo apt install nodejs npm`

`sudo npm install -g playwright`

`sudo apt-get install libasound2 libasound2-plugins`

`rm -rf ~/.cache/ms-playwright`

`playwright install`

`sudo npx playwright install-deps`

`uname -m`

`npx playwright install firefox`

`npx playwright install webkit`

`cd google-maps-scraper`

`go mod download`

`go build`

(Adjust the number after -c depending on the number of cores your EC2 instance has, 1 less than the number of cores you have, the EC2 Instance I chose has 4 cores)

`./google-maps-scraper -web -c 3`

Edit inbound security group rules of the EC2 Instance to allow 8080 port range from anywhere

![aws ec2 edit security group rules](https://github.com/user-attachments/assets/9f3a9841-c209-4f8c-8585-f63e4d60344b)

Visit the port 8080 of the public IP address of the EC2, like 54.147.206.100:8080 , be sure to use HTTP instead of HTTPS or it won't connect

![aws ec2 running scraper](https://github.com/user-attachments/assets/dbd7328b-fd6c-43c1-8def-20d66887cbf5)

Above is what the scraper looks like in action.

THANK YOU @gosom FOR YOUR WONDERFUL TOOL!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.