An automated bot that provides listings for bookings on the website www.booking.com
.
Explore the implementation »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
python [ver 3.9]
.- Chrome Webdriver
- Python 3.9 Interpreter
- For the automation:
selenium
- For CLI printing (python):
prettytable
- Install the requirements file using
pip install -r requirements.txt
- Find the Chrome Webdriver here. (download the version most compatible with your browser version)
- Please make sure to check the versions of all the packages mentioned, since some packages may not work on recent releases.
www.booking.com
is one of the largest online hotel booking facilitators in the world. On this website, I have learned to execute selenium-based automation along with python as my base language. This program takes in the city as location, along with the duration and the number of adults, and searches deals for the given location.This program automates on a Chrome browser. Selenium uses a framework called Web Driver, which allows us to execute tests across various browsers. Web Driver makes it possible to write a test script in Linux and run it in Windows, all by setting one variable correctly. There are multiple programming languages which are supported by Web Driver such as Java, Python, Ruby, .Net, PHP to create test scripts.
PATH
variable to direct to the path of the directory which stores your webdriver.- For Windows:
setx PATH "%PATH%;C:\webdriver-location-here\"
- For macOs and Linux:
export PATH=$PATH:/webdriver-location-here >> ~/.profile
- Read CONRIBUTING.md before submitting a pull request.
-
Go through our directory structure to get a better idea about performing and commiting changes.
| main.py | README.md | CONTRIBUTING.md | requirements.txt | +---.idea | [many config files] | +---Bot | | booking.py | | booking_filtration.py | | booking_report.py | | constants.py | | __init__.py | | | \---__pycache__ | [many cache files here] | \---help pip_show.png refactoring_html.png terminal_output.txt tree.txt
Most of the contributions will be made in theBot
directory ormain.py
file. Thehelp
directory contains some resources that helped me figure out the project.
- To make the CLI execution more detailed
- To authorize login from CLI
- To add a sorting feature according to stars and prices
- To provide top 5 deals for every search based on price, rating
- Add
lxml
functionality to clean the html entities such as(amphersant)nbsp
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
Note: Read the terms and conditions of the Creatives Commons License.