Make sure you follow the conditions:
- Use Terminal
git clone https//:www.github.com:ahmedmoamen1/Car-Sales-database.git
touch Car-Sales-database
- Through github download code
- Create mysql Databse server through any hosting website.(https://www.freemysqlhosting.net/)
- Or localhost by downloading a sql server and mysql workbench
Must download the follwoing libraries:
- beautifulsoup4
- requests
- pandas
- selenium
- selenium-stealth
- mysql-connector-python
- flask
pip install beautifulsoup4 requests pandas selenium selenium-stealth mysql-connector-python flask
The database has 7 tables:
- Seller table stores information about car sellers.
- Car table stores information about cars owned by sellers.
- CarAdvert table stores information about car advertisements created by sellers.
- CarAdvert_features table stores information about features of car advertisements.
- User_buyer table stores information about buyers.
- User_buyer_intCars table stores information about cars that a buyer is interested in.
- Purchase table stores information about car purchases made by buyers.
This program extracts data from a website using web scraping techniques. It uses the BeautifulSoup library for parsing HTML and the Requests library for making HTTP requests. It also uses the Selenium library to handle dynamically generated content and to perform actions on the webpage. The program extracts numerical data from the website and saves it to a CSV file.
- Make sure you have the required libraries installed (BeautifulSoup, Requests, Selenium, Pandas).
- Run the program by executing the following command:
python program_name.py
- The program will prompt you to enter a URL. Enter the URL of the website you want to scrape.
- The program will then extract the data and save it to a CSV file.
The application provides the following functionalities:
- Register new users
- Add new car advertisements
- Purchase cars
- View car reviews and ratings
- Filter car advertisements by features and location
- View top 5 locations for a specific car make and model
- Run the application with
python main.py
. - Navigate to
http://localhost:5000
in your web browser. - Register an account or log in with an existing account.
- Search for cars using the search form on the home page.
- View a seller's inventory by clicking on their name.
- Leave a review or rating for a car you purchased by clicking on the "Add a review" button on the car's page.