Git Product home page Git Product logo

price's Introduction

Purpose

This script have severals steps :

  1. Web crawl everals website (cf Managed Website below) with simple http request (like wget) or with more complexe request to be like a real human (use of selenium lib).
  2. Store in a python dict
  3. Store in elastic cluster in case the price has change (up or down)
  4. Create alerts in case of a degrease price of more than 20% by mail, mattermost or Discord. For now, Discord is for me the best and simplest one.

Requirements to run :

  • [require] Docker service on a dedicated and always running VM/server
  • [require] Elastic cluster to store price (and add config in config.yml)
  • [optionnal] Discord webhook
  • [optionnal] Mastodon account
  • [optionnal] Mail account

Managed website

  • deporvillage.fr
  • decathlon.fr
  • cyclable.com
  • probikeshop.fr
  • bikester.fr
  • culturevelo.com
  • alltricks.fr
  • bike24.fr

Files details

app.py

The main script that mainly manage the 4 phases describe in purpose part.

conf/config.yml

Permit to manage all variable that can vary like :

  • Mail
  • Mastodon
  • Discord
  • List of web pages to survey

lib/site.py & conf/site.yml

site.py is the lib to manage crawling with the tag defined in site.yml.
This lib is a try to be more generic as possible but need to adapt to specific website.

survey.py

Permit to check if there is still data injected in Elastic Cluster from list config.yml -> "tosurvey".

Dockers

Dockerfile and docker-compose.yml̀ permit to create a container with all package and python lib requirements.txt.

price's People

Contributors

noliono avatar

Stargazers

 avatar

Watchers

 avatar

price's Issues

Add IMG url

Add IMG of product to add it in Discord output

Case of products delete from website

For that case, we need to store the actual and last run, then use it to search in elastic database.
That will permit to detect new product (added in actual run) or delete product (added un last run), because the elastic search will return only one result instead 2.

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.