This Python script is designed to scrape tender information from the eTenders website (https://www.etenders.gov.za/Home/opportunities?id=1). It utilizes Selenium and BeautifulSoup libraries to extract data from the webpage.
- Python 3.x
requestsbeautifulsoup4seleniummysql-connector- Chrome WebDriver (Make sure it's compatible with your Chrome browser version)
- Install required libraries using pip:
pip install requests beautifulsoup4 selenium mysql-connector
- Install Chrome WebDriver. Make sure it's in your system's PATH.
- Run the Python script:
python etender_scraper.py - Enter the starting page number when prompted.
- The script will scrape tender data from the eTenders website and save it to a JSON file named
extracted_tenders.json. - install my sql
- Run the python Script
- Run the python script:
python db.py
- Ensure a stable internet connection as the script requires to access the eTenders website.
- Make sure Chrome WebDriver is compatible with your Chrome browser version. You may need to update WebDriver if you encounter issues.
- The script may take some time to execute depending on the number of pages to scrape.