Giter Club home page Giter Club logo

countdown-nwm-scraping's Introduction

Smart Shopping Application. Web scraping + RESTful API + Server + Admin Panel

This app performs web scraping to collect information related with products from two big New Zealand supermarkets. Uses cheerio.js to perform DOM manipulation on the server side and get data about their categories, product names, prices, offers, etc. The database in NoSQL (MongoDB), the main server side programming language is Node.js. Also a little bit of EJS (template enginee) and the classic (bad still alive) HTML+CSS+JavaScript+jQuery approach for the Admin Panel (FrontEnd). Last, but not least, the RESTful API that feed the main FrontEnd (a beatiful iOS app that is not hosted here) is deplayed in Heroku. Enjoy!

Setting up the server, database and admin panel to run the app locally

1, 2 and 3- Node.js, MongoDB Community Server and Robo3T installation

Download their latest versions according to your OS version:

Then open the exe files, install the applications, and follow the instructions

4 - Close this repository and prepare de Node server

In the terminal run:

git clone https://github.com/diegoevangelisti/countdown-nwm-scraping

Run the following statement:

cd countdown-nwm-scraping

npm init

npm install --save

5 - Set up mongodb server

Open another terminal and go to the folder where Mongodb server is installed - in windows: C:\Program Files\MongoDB\Server\4.0\bin

Then run: ./mongod

After that the server should be properly running and we can connect our app to mongodb

6 - Robo3T setup

Open the Robo3T application nd create a new database named SSA and then connect to it

7 - Run application

In the terminal type:

node index.js

8 - Back office login

Open the browser and go to: http://localhost:5000/

Then enter the following credentials:

username: backend password: backend

After login the app won't show data in Countdown and NWM because there is no data in the database

Go to Options -> Get Data (Countown and New World)

That data can be visualized in the back office going to: Options -> COUNTDOWN DATA and NEW WORLD DATA Can be checked in Robo3T as well.

9 - Extra notes

Now the application is configured to perform web scraping in Countdown and New World shops. Setup: Takes all the categories, and scrapes 5 pages of 24 and 20 products from each supermarket respectively.

Created by Diego Evangelisti. April, 2019

countdown-nwm-scraping's People

Contributors

diegoevangelisti avatar jtruzzi avatar

Stargazers

MagicMan avatar Byron Goldsack avatar  avatar Hitarth Sharma avatar Alex McLeod avatar Lan Zhang avatar  avatar Taiao Kawiti avatar  avatar Jareth MacArthur avatar Zac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.