A command-line tool that collects job postings (title, company, location, link) from Indeed search results and saves them to a CSV file. Built with Selenium for browser automation and BeautifulSoup for parsing.
python job_scraper.py "software engineer" "Berlin" --max-pages 3- Command-line interface with sensible defaults (query, location, page limit, output file, Indeed domain)
- Correct URL encoding, so multi-word queries and locations with umlauts (e.g. "Köln") work
- Pagination that stops at the last page or at
--max-pages, whichever comes first - Deduplication of postings that Indeed repeats across pages
- Polite scraping: randomised delay between page requests
- Offline tests for URL building, HTML parsing and deduplication, run on every push with GitHub Actions
Requires Python 3.10+ and Google Chrome. Selenium 4.6+ downloads a matching ChromeDriver automatically.
pip install -r requirements.txtpython job_scraper.py QUERY LOCATION [options]| Option | Default | Description |
|---|---|---|
--max-pages |
5 | Maximum number of result pages |
--output |
jobs.csv |
Output CSV file |
--domain |
de.indeed.com |
Indeed country site, e.g. www.indeed.com, uk.indeed.com |
--delay |
3 | Base delay in seconds between pages |
--show-browser |
off | Show the Chrome window instead of running headless |
Output columns: title, company, location, url.
pip install pytest
pytestThe tests use a saved HTML sample, so they run without a browser or network access.
- Indeed changes its page markup from time to time; the CSS selectors in
parse_jobsmay need updating when it does. - Indeed uses bot protection, so requests can be blocked. The scraper reports this instead of failing silently.
- Check Indeed's terms of service before scraping, and keep request volumes low. This project is intended for learning and personal use.