This repo contains a Python script that opens the website of LATAM airlines, inputs some parameters in the flight search fields and scrapes some data off of the page using Python selenium
This small project demonstrates how to use Python Selenium to control a webpage. I chose the LATAM airlines website to show how to use th basic functions of Selenium such as:
- Maximizing the window
- Extracting data points from the pages' HTML code
- Locating and clicking on elements
- Inserting data into fields
- Choosing dates from a drop-down menu
The steps performed by the code are as follows:
- Navigate to the US website
- Enter the flight origin
- Enter the flight destination
- Check the Use LATAM Pass Miles checkbox
- Choose a departure date
- Choose a return date
- Click Enter
These fields are shown in the image below...
The following GIF shows the code in action
If you have any questions or wish to build a scraper for a particular use case (e.g., Competitive Intelligence, web automation, or price comparison), feel free to contact me on LinkedIn