chaodonghu / shopify-scraper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shopify Scraper

A shopify products monitor that notifies users of products that have been added to sites. Enables the ability to receive notifications for certain keywords.

Connects directly with discord for notifications.

Users are notified of the product that has been added to the shopify site and can add to the user's cart if desired.

A sample notification on discord:

Screen Shot 2020-12-24 at 11 51 42 PM

Usage

The repository has been dockerized to allow for easy development and deployment.

  1. Install Docker

  2. Copy the .env.example file and make a .env file to store environment variables/secrets/urls

Add your DB credentials and WEBHOOK_URLS to the .env file (See Configuration Options for more information)

  1. Run the app with
docker-compose up

On successful run you should see a message in your discord: Monitor successfully started, time to get that bread fam

Screen Shot 2020-12-25 at 12 00 03 AM

Configuration Options

Environment variables:

These should be defined in .env

  1. MONGODB_URI which consists of DB_HOST, DB_NAME, DB_PASS, DB_PORT and DB_USER

    • URI that connects to your mongodb database by default utilize mongodb://db:27017/xxx with xxx being any database name you would like to specify (eg. mongodb://db:27017/shopify_database)
  2. WEBHOOK_URLS

Configuration:

These should be defined in /src/config.js

  1. DISCORD_MESSAGE_SETTINGS
  2. REQUEST_TIMING
  3. SITES

Future Improvements

  • Implement scraping on sites that do not utilize Shopify platform

Acknowledgements

Donations

If this has helped you!

About


Languages

Language:JavaScript 99.1%Language:Dockerfile 0.9%