Git Product home page Git Product logo

vahti's Introduction

Vahti

Vahti is a tool that keeps track on given websites and notifies the user on new items via email.

Currently only posti.fi parcel tracking and tori.fi are supported. However, new parsers can now be easily added.

This script isn't a daemon so it should be run on Crontab or Scheduler to automate the process. The script is tested to be working on Python 3.2+ and depends on BeautifulSoup4.

Please note that, you might have to turn on access for less secure apps in google account security settings, in order to use the smtplib for sending notification mails. (Also, check your spam if you don't see the notifications sent).

Usage

  1. Change settings in config.py accordingly
  2. (Install Python 3.x) and install requirements with pip pip install -r requirements.txt
  3. Run the script with options python vahti.py [options]
    • -h, --help to show the script help message
    • -p, --parser to select which parser to use (currently you can select from "tori" or "posti")
    • -q, --query to give the query string (i.e. posti tracking number or tori.fi search query). Separate multiple queries with a comma.
    • -e, --email to specify a different email recipient
    • -c, --clear to empty the database

Some query examples:

python vahti.py --parser tori --query nintendo --email [email protected]
python vahti.py -p tori --query "sohva,tuoli,pöytä"
python vahti.py -p posti -q JJFI99992261500081870

Clear the database

python vahti.py --clear

Here's a fully working crontab line for searching nintendos in tori.fi and tracking parcels:

*/15 * * * * python3 /home/peter/projects/vahti/vahti.py --parser tori --query "nintendo" --email [email protected] 

Unfortunately currently the script supports only one parser at a time, so if you want to use both tori and posti at the same time, you will need to add several crontab lines.

vahti's People

Contributors

bembu avatar pkronstrom avatar stezz avatar

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.