The JobScraper script is a Python-based tool that allows users to search and retrieve job postings from two popular job listing platforms: Indeed and LinkedIn. This script is designed to streamline the process of finding job opportunities for a specific job position in a specified location. It can automatically gather job listings, format the data, and send the results to an email address.
-
Create a
.env
file: Before using the script, you need to create a.env
file to securely store your email credentials. The.env
file should contain the following information:EMAIL_SENDER=your_email@gmail.com EMAIL_PASSWORD=your_email_password EMAIL_RECEIVER=recipient_email@example.com
Replace
your_email@gmail.com
with your Gmail address andyour_email_password
with the App Password or OAuth2 Token generated for your Gmail account. Storing your email credentials in the.env
file ensures their security. -
Run the command
pip install -r requirements.txt
to install all the dependecies used in the script.
- Job Name: The user is prompted to enter the job title or position they are interested in.
- Country: The desired country or location for job searching.
- Location: The specific location or city for job searching.
- Number of Results: The user can specify the number of job listings they want to retrieve.
- The script utilizes the 'jobspy' library to scrape job postings from LinkedIn and Indeed.
- It sends a search query to both platforms, collects job listings, and compiles the results.
- The scraped job data is structured into a pandas DataFrame for easy manipulation.
- The script formats the output for better readability.
- The script saves the job listings as both a CSV (Comma-Separated Values) file and an Excel file (XLSX).
- The file names include the current date to organize the data.
- The script sends an email notification to the user.
- It includes a subject line mentioning the date of the job search.
- The email body provides a brief message with instructions on accessing the attached job listings.
- Create a .env file an put your email and password.
- Execute the command
pip install -r requirements.txt
- Run the file
setup.py
. - Provide input parameters, including the job name, country, location, and the number of results desired.
- The script will perform the following steps:
- Scrape job postings from LinkedIn and Indeed.
- Structure the data into a DataFrame.
- Save the data as CSV and Excel files.
- Send an email notification with attached files.
- Check your email for the job listings and access the attachments.
- Python: The script is written in Python, so you need a Python environment to run it.
- jobspy Library: Used for web scraping job postings.
- pandas Library: Used for data manipulation and formatting.
- openpyxl Library: Used for handling Excel files.
- smtplib Library: Used for sending emails.
- decouple Library: Used for managing sensitive data like email credentials.
- Ensure that you have the necessary libraries installed before running the script.
- Review the email configuration to ensure successful delivery.
Happy job hunting!