This project is a Python-based LinkedIn job scraper using Selenium. The scraper navigates LinkedIn's job search pages, collects data on job postings, and saves the information to a CSV file for further analysis.
- Job Details Extraction: Collects job title, company name, location, job type (Remote/Hybrid/On-site), seniority level, posted time, number of applicants, number of employees, industry, job posting URL, and job description.
- Pagination Handling: Automatically navigates through multiple pages of job listings.
- CSV Export: Saves the collected data into a CSV file for easy access and analysis.
- Dynamic URL and Job ID Extraction: Extracts the current job's URL and job ID dynamically from the browser.
- Python 3.x
- Selenium
- WebDriver Manager
-
Clone the repository:
git clone https://github.com/yourusername/linkedin-job-scraper.git cd linkedin-job-scraper -
Install the required packages:
pip install -r requirements.txt
-
Configure the Search Query: Open
main.pyand set your desired keywords and location in thequerydictionary:query = { 'keywords': 'Data Analyst', 'location': 'European Union' }
-
Run the Scraper: Execute
main.pyto start scraping:python main.py -
Output: The script will save the job data into
linkedin_jobs.csvin the project directory.
scraper.py: Contains theSearchclass, which implements all the scraping logic.main.py: The main script to configure and run the scraper.
- Make sure you have a stable internet connection, as the scraper needs to load multiple pages.
- The script currently works with LinkedIn's job search interface. If LinkedIn updates its layout or structure, the scraper may need adjustments.
- Respect LinkedIn's terms of service and use this tool responsibly. Excessive scraping may lead to IP blocking or account issues.
Feel free to submit pull requests or open issues to improve the scraper.
This project is licensed under the MIT License.
