Giter VIP home page Giter VIP logo

ticketsfinder's Introduction

Hermon Tickets Finder

A python script that looks for available tickets to Mount Hermon and sends alerts in real-time to all emails interested.

How it works:

Every fixed amount of seconds, using selenium, the script gets the HTML of the tickets page. The HTML is parsed using BeautifulSoup, and the script checks whether there are dates with available tickets. If so, the script sends an email to the email addresses specified, to notify about the tickets. Afterwards, the script sleeps for a fixed amount of time, and does the same process again.

All the settings are defined in the config.yaml file and can be changed according to your needs.

Setup before run:

Installations:

Libraries used:

  • Selenium
  • Beautiful Soup
  • PyYAML
pip install -r requirements.txt

Selenium setup:

The script works with selenium Firefox, so Firefox needs to be installed. In order to work with the selenium firefox-geckodriver, it needs to be installed:

Linux:

sudo apt install firefox-geckodriver

Windows:
The selenium firefox-geckodriver can be installed here.
After installing and extracting the geckodriver.exe, copy it into one of your System paths.

Code setup:

The script sends alerts to the emails specified in the beginning of the run. So before running the script, you need to fill in a working email address and a password for the email address you want the script to send the alerts from.

Change the following lines in the config.yaml file: (lines 2-3)

# ===== Email settings =====
email_address: [email protected]
email_password: password_example

Running the script:

After the setup, you can run the python script. You can specify the time you want for the script to run and the email addresses you want to be notified in the command line arguments.

# Run the script for 10 minutes, and send alerts to: [email protected], [email protected]
python tickets.py --time=10 --recipients="[email protected], [email protected]"

# The same as above, but shorter
python tickets.py -t 10 -r "[email protected], [email protected]"

You can use the -v or --verbose option for a more verbose output, and -h or --help to see the help list. In addition, you can edit the default values for all the command line options in the config.yaml file. This way you will be able to run the script without specifying any additional arguments.

That's it! Have fun skiing in the Hermon :)

Run example:

run example

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.