Skip to content

A quick script to check the price and availability of RaspberryPi's on PiHut Built for the Abertay Programming Society

Notifications You must be signed in to change notification settings

ne0g/RPiScrape

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scraping Logic

Found in the scraping directory

cd scraping

Usage

Virtual Environment

Create a virtual environment

python3 -m venv .

Start Virtual Environment

source bin/activate

install dependancies

pip3 install -r req.txt

Get geckodriver

Run the script

python3 main.py

Docker Usage

Build Dockerfile's

Create Docker Network

sudo docker network create rpi-scrape-network

Build Database Image

sudo docker build -t rpidatabase database/

Run Database Image

sudo docker run -d --name rpi-scrape --network rpi-scrape-network -p 3306:3306 rpidatabase

Once this is done use the docker inspect command to get the ip address on the network and update the DatabaseLogic.py script

Build WebScraperImage

sudo docker build -t rpiscrape scraping/

Run Scraper Image

sudo docker run --name python-scraper --network rpi-scrape-network rpiscrape

About

A quick script to check the price and availability of RaspberryPi's on PiHut Built for the Abertay Programming Society

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.7%
  • Dockerfile 13.3%