Giter VIP home page Giter VIP logo

fuel-price-tracker-in-the-greater-toronto-area's Introduction

Fuel Price Tracker in the Greater Toronto Area (GTA)

About the Project

This project is a Python script designed to monitor and track price changes in the Greater Toronto Area (GTA). Utilizing Selenium WebDriver for web scraping, the script extracts the current, previous, and upcoming prices and processes the data to determine the price trend. It then sends formatted notifications to a Discord channel via a webhook. This script can be scheduled to run at desired intervals (using Windows Task Scheduler), providing timely updates on price fluctuations aiding in informed decision-making.

This project is the spiritual successor of the original gas scraper project found here as it is much more accurate and secure than the previous project.

Features at a Glance

  • Retrieves and analyzes fuel prices for the current, previous, and upcoming day from a specified webpage.
  • Provides a summary of price trends.
  • Sends formatted price information and summary to a Discord channel through a webhook.

Installation Requirements

Ensure you have the following installed on your machine:

  1. Python
  2. Pip
  3. Requests
  4. Selenium (Official Website)
  5. Discord
  6. Google Chrome

Setup

Follow these steps to get the project up and running:

1. Install the necessary packages

Download and install the required packages listed above.

2. Configure Environment Variable

Set up your environment variable for the Discord webhook URL as well as the webhook itself. The variable name used in the code is WEBHOOK_URL.

  • Help with Discord Webhook: If you need help setting up a Discord webhook, check out this article.
  • Help with Environment Variables: If you need help setting up an environment variable, check out this article.

3. Download the Python script

You can either download the .py file here or you can use the git clone command:

git clone https://github.com/your-username/Fuel-Price-Tracker-in-the-Greater-Toronto-Area.git
cd Fuel-Price-Tracker-in-the-Greater-Toronto-Area

4. Schedule the Script

Set up the script to run automatically at a desired time.

  • Windows: Use the Windows Task Scheduler. Here's a video guide on how to do that.
  • Mac/Linux: Use Cron job. Learn more about Cron jobs.

Example Output

Here is an example output on a Discord channel:

ex_image

Additional Information

  • To deploy this script on other computers, you can convert it into an executable file using auto-py-to-exe.
  • By default, it is setup as Chrome for the Selenium webdriver however, there are other options such as Internet Explorer, FireFox and Safari browser. To setup as a different browser, check out this article here

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.