This Python script scrapes faculty information, specifically names and email addresses. The data extracted is then compiled into a CSV file for easy access and manipulation. The script utilizes requests-html
for web scraping and pandas
for data manipulation and saving.
NOTE: the script will have to be modified for every url based on the page structure.
pandas
requests-html
You can install the necessary libraries using pip:
pip install pandas requests-html
- Clone the repository or download the script to your local machine.
- Install the required Python packages listed under Requirements.
To run the script, navigate to the directory containing the script and execute it with Python:
python faculty_scraper.py output_filename.csv
The script will scrape the faculty information from the specified URL and save it to a CSV file in the same directory.
The output CSV file will contain the following columns:
FName
: The first names of the faculty members.Email
: The email addresses of the faculty members.