PTEBookingST is a program that helps people snap up newly available seats for PTE Academic Exam Australia.
Scrape the seat availability website continuously to report new vacant seats.
Alert the user by email when a new seat in preferred date range has become available.
Sort new seats by user preference and auto secure seats (book the exam) following the sorted order.
This feature is currently not complete. Please feel free to check out the sorter.py and booker.py files to extend the codes.
This project is licensed under Attribution-NonCommercial 4.0 International.
As part of the initiative for urging Pearson to improve its PTE exam booking impartiality and website robustness (e.g. Adding CAPTCHAs), this project has been made open source and is free for download and use under the constraints specified in the license. Check out this page for a brief summary of the license: https://creativecommons.org/licenses/by-nc/4.0/
PTEBookingST requires several dependencies to be installed in order to be successfully up and running.
This program is written in Python and thus requires Python to be installed on your computer to be able to run.
Installing Python 3 on Mac OS X
How to Install Python on Windows
Selenium is a browser automation tool and is at the core of the program. Run the following on Mac Terminal or Windows Command Line to install:
pip3 install selenium
or
pip install selenium
PhantomJS is a headless browser with JavaScript support. It is used in conjunction with Selenium (as the driver).
Download PhantomJS at this address: http://phantomjs.org/download.html
Place it in /usr/bin
or /usr/local/bin
(command
+shift
+.
to show hidden files and folders)
Add the directory in where you executable is to PATH environment variable. Refer to this doc for instructions: How to set the path and environment variables in Windows
Requests is a Python module for easily sending web requests to API. It is used in the program for sending requests to MailGun email sending API. Run the following on Mac Terminal or Windows Command Line to install:
pip3 install requests
or
pip install requests
PTEBookingST consumes mailgun API under the hood to send email notifications. To enable email notification functionality in the program, users need to register with mailgun to obtain a free mailgun domain and an API key for authenticating with mailgun service.
Once registered and logged in, go to Domains > Your random allocated domain > Domain Information for the domain name and API key.
- Download this project to local and point Mac Terminal or Windows Command Line to the project folder. E.g:
cd /Users/seacen/Development/Projects/PTEBookingST
- Run the program by executing this command:
python3 run.py
or
python run.py
PTEBookingST stores and reads your settings in configs folder. Modify values in the following files to manipulate the program behaviour.
This file stores common settings for the program.
Key | Description | Value Format |
---|---|---|
start_date | the earlist date you want to take the exam in | yyyy-mm-dd |
end_date | the latest date you want to subscribe the seats information of | yyyy-mm-dd |
city | city to sit your exam in | city name in lower letters |
scraping_interval | the interval between each new scraping round | number in minutes, can be decimal |
do_email_alert | whether email alerts should be sent when new seat is found | true or false |
do_check_time | whether to scrape the individual time of the available date | true or false |
This file stores the email addresses that you want to be put as recipients of the email notification. Each email address should take up a line in the file.
This file stores your mailgun account information. See Email Notification for details.
Key | Description | Value Format |
---|---|---|
domain | the free domain that has been allocated to your account | full domain |
api_key | API key of your mailgun account | API key |