Project to practice web scraping by getting movies, tv shows, and people information from The Movie DB site using Python, Selenium and the Page Object Model design pattern.
- Clone or download the repository:
git clone https://github.com/betofleitass/themoviedb-scraper
- Go to the project directory
cd themoviedb-scraper
-
Create a virtual environment and activate it:
PowerShell:
python -m venv venv venv\Scripts\Activate.ps1
Linux:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Go to the project directory:
cd themoviedb-scraper
-
Run the following command (e.g.):
py .\test_get_movies.py
This will run the test case that scrapes a list of movies.
py .\smoke_test.py
This will run the all tests that are in the test suite.
- Go to the reports folder to view the test results
themoviedb-scraper/
├── pages/
│ ├── __init__.py
│ ├── home_page.py
│ ├── movies_list_page.py
│ ├── people_list_page.py
│ └── tv_shows_list_page.py
├── reports
├── requirements.txt
├── smoke_test.py
├── test_get_movies.py
├── test_get_people.py
├── test_get_tv_shows.py
└── test_home_page.py
pages
: This directory contains the Page Object Model classes that represent the different pages of the The Movie DB website.reports
: This directory contains the results of the tests.smoke_test
: This file contains a test suite with all the tests.