JuliaGrandury / web-scraperandbot

Web Scraper and Reservation Bot in Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Logo

Web Scraper and Reservation Bot for "Les Glénans" Sailing School

In the interest of saving time and completing tedious tasks

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contact

About The Project

![Web Scraper And Reservation Bot Gif]

Why? For the last couple of years, I have been attending a sailing school to obtain my windsurfing instructor's degree. Every year, the process of signing up is time consuming and stressful as spots quickly decrease and the rules state you must renew your reservations - which entails going to the website, signing up for every course again and clicking through all of the verification - every three days until you are ready to make the financial commitment. To avoid this yearly time consuming and tedious process, I decided to build a web scraper and reservation bot that could deal with this for me.

TL;DR I like to build things to make my life easier.

Features include:

  • Prompts User: Prompts the user for login credentials to the school
  • Logs In: Logs into the website after prompting the user for their email, password and desired course
  • Scrapes the page: Scrapes the location, name, date and number of spots left for the course (note: the number of spots left per course is not public information in that it is not visible to anyone visiting the website.)
  • Sends Summarized Data: Summarizes all of the extracted data into a human readable summary sent in an email after every run
  • Makes a Reservation: Makes a reservation for the specific course on the specific date

Note: To make a reservation, a Les Glénans account is required. If the email and password you provided when prompted do not correspond to a registered account the program will return before making a reservation but after sending the summary of your requested courses.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

You will need to have Node.js and npm package manager installed. If you do not, visit Node.js and download the version labeled LTS. To install the latest version of npm run npm install npm@latest -g. Ensure that both are correctly installed using node -v and npm -v.

Installation

  1. Clone the repo

    git clone https://github.com/JuliaGrandury/web-scraperandbot.git
  2. Install dependencies

    npm cheerio puppeteer prompts mocha chai dotenv nodemailer
  3. Create a .env file where with two variables which will be used as the sender for the sendEmail function: MAIL_EMAIL = 'your email' and MAIL_PASSWORD = 'your password'. You will need to disable two factor authorization and allow less trusted apps in your Gmail settings.

  4. Run the application using npm run start

  5. Run the test suite using npm test or a specific file using npm test <filepath>

(back to top)

Roadmap

  • Sending summary email of results
  • Expanding sign in to the email and password provided
  • Finish unit testing
  • Fix formatting of email body to be clearer
  • Submitting reservation of courses
  • Confirmation email that reservation was made
  • Automating as job every three days

(back to top)

Acknowledgements

Some helpful resources I used for various parts of my project.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Julia Grandury - booleanjules@gmail.com

Project Link: https://github.com/JuliaGrandury/web-scraperandbot

(back to top)

About

Web Scraper and Reservation Bot in Node.js

License:MIT License


Languages

Language:JavaScript 100.0%