Skip to content
/ lucas Public

🕸 Web scraper designed with Go and Colly

Notifications You must be signed in to change notification settings

dan-mcm/lucas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lucas

Lucas is a web crawler built using Go and the Colly library.

It is currently setup to crawl floryday -> it will write its output to the connected psql DB and output the results of its latest crawl to the console

Running Locally

DB Setup

Note: Environmental variables for DB setup are included in the .env file.

cd db
docker-compose up -d
psql -h localhost -U user lucas_db -f dbsetup.sql

# note if using docker toolbox you may prefer the following cmd
psql -h "toolbox-ip-address" -p "5432" -U "user" -d "lucas_db" -f "dbsetup.sql"

Install Dependencies

go.mod is used for dependency management.

Run Lucas

The main package is located under src/app -> with the main function located within lucas.go. To run the scraper:

go run src/app/*.go

Docker

To run Lucas in a Docker container

# build docker image
docker build src/app

# run docker container and portforward port 3000
docker run -ti -p 8000:8000 --network="host" <docker-image-id>

# publish docker image to docker hub
docker push <docker-repo>

About

🕸 Web scraper designed with Go and Colly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published