Skip to content

Milner39/Special-Offer-Scraper

Repository files navigation

What Does It Do?

This application periodically scrapes this site for car deals.

At the time of creating this repo, there is currently no way to set up alerts for car deals that I am interested in. So every 24 hours, this application uses puppeteer to scrape key information from the site.

There is also some pretty clever code to check which offers have been deleted or added to the site, preventing duplicate alerts. Hash Maps and Sets are used to get very solid time complexities.

Deals that are added can be:

  • Filtered
  • Sent to a recipient via email

You can also add your Fleet Solutions login details to a .env file and the scraper will log into your account and only show offers available specifically to your company.

Prerequisites

  • You must have a version of Chrome installed.

  • You must have deno installed.


How To Use

Running

  1. Install dependencies with:
    pnpm i

  1. Rename .env.example to .env file in the project's root. You can check what env options there are in the env.ts file.

  1. Start the application with:
    pnpm run start

Compiling

  1. Compile the application with:
    pnpm run compile

  1. Start the scraper.exe file however you like.

Mail Alerts

Currently only gmail accounts are supported, if you want to receive emails when new offers are added:

  1. Create a gmail account (or use an existing one), and set up 2FA.

  1. Create an application password for the gmail account.

  1. Set the appropriate environment variables in the .env file.

A typical alert email looks like this:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published