Skip to content

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

AutoJobSearch_Antigravity 🤖

A professional-grade Python framework built with Playwright to automate job market intelligence. This tool executes precision searches, applies deterministic filtering to results, and delivers a centralized daily intelligence report.


🚀 Key Engineering Solutions

As a Senior QA-driven project, this tool goes beyond simple scraping:

  • Native Event Simulation: Bypasses "lazy-loading" UI constraints by simulating native hardware mouse-wheel events at specific viewport coordinates.
  • Deterministic Filtering: Implements Regex-based title validation to ensure high-relevance targeting for Lead and Senior roles.
  • Session Injection: Securely manages LinkedIn authentication via state-sharing (session.json), eliminating the need for repeated logins and reducing bot-detection risk.

What It Does

Search Keywords Locations Time Filter
Software QA Lead New Jersey · Remote Last 24 hours
QA Automation Engineer New Jersey · Remote Last 24 hours

Results are deduplicated by LinkedIn job ID and exported to:

data/jobs/AutoJobSearch_Antigravity_YYYY-MM-DD.csv

You receive an email at 5 AM with:

  • A dark-mode HTML summary table (job count, pay rate, remote stats)
  • The full CSV attached (title, company, location, pay rate, job description, apply link)

Prerequisites

  • Python 3.11+
  • Windows 10/11 (for Task Scheduler)
  • A Gmail account with an App Password

Setup (One-Time)

1. Clone & Install

cd AutoJobSearch_Antigravity
pip install -r requirements.txt
playwright install chromium

2. Configure .env

Copy the template and fill in your credentials:

copy .env.example .env

Open .env and edit:

EMAIL_SENDER=your_gmail@gmail.com
EMAIL_PASSWORD=xxxxxxxxxxx     # 16-char Gmail App Password (no spaces needed)
EMAIL_RECIPIENT=your_gmail@gmail.com

LINKEDIN_EMAIL=your_linkedin@email.com
LINKEDIN_PASSWORD=your_linkedin_password

3. Generate a Gmail App Password

⚠️ 2-Step Verification must be ON before this option appears.

  1. Go to myaccount.google.com → Security
  2. Enable 2-Step Verification if not already on
  3. Search "App Passwords" in the search bar
  4. Select Mail + Windows Computer → Generate
  5. Copy the 16-character password → paste into .env as EMAIL_PASSWORD

4. LinkedIn Login (One-Time)

This saves your session so future runs are fully automated:

python main.py --login

A browser window opens → log in → press ENTER in the terminal. Your session is saved to data/session.json and reused automatically.

Session expires? Just run --login again.

5. Schedule Daily 5 AM Run

python setup_scheduler.py

Verify in Windows Task Scheduler (taskschd.msc) that AutoJobSearch_Antogravity_Scraper appears under Task Scheduler Library.


Usage

Command Description
python main.py Full run: scrape → CSV → email
python main.py --login Re-authenticate LinkedIn session
python main.py --dry-run Scrape + CSV, preview email in terminal (no send)
python main.py --no-email Scrape + CSV only, skip email
python main.py --test-email Re-send the most recent CSV as email
python setup_scheduler.py Register 5 AM daily task
python setup_scheduler.py --status Check task details
python setup_scheduler.py --remove Delete the scheduled task

Project Structure

AutoJobSearch_Antigravity/
├── scraper/
│   ├── browser_config.py    # Stealth Playwright setup + session management
│   ├── linkedin_scraper.py  # Core scraper — runs all 4 searches
│   └── job_parser.py        # CSS-selector data extraction helpers
├── notifier/
│   └── email_sender.py      # Gmail SMTP + dark-mode HTML email
├── config/
│   └── settings.py          # All config loaded from .env
├── data/
│   ├── session.json          # LinkedIn session cookies (gitignored)
│   └── jobs/                 # Output CSVs (gitignored)
├── logs/
│   └── scraper.log           # Rotating log (gitignored)
├── main.py                   # Entry point
├── setup_scheduler.py        # Windows Task Scheduler helper
├── requirements.txt
├── .env                      # Your credentials (gitignored)
└── .env.example              # Template

CSV Columns

Column Description
title Job title
company Hiring company
location Listed location
pay_rate Salary / hourly rate (if shown)
job_description Full JD text
apply_link Direct LinkedIn apply URL
search_keyword Which keyword matched
search_location New Jersey or Remote
scraped_at Timestamp of extraction
job_id LinkedIn internal job ID

Troubleshooting

authwall / redirected to login

Your session expired. Run python main.py --login to refresh.

Gmail auth error

Make sure EMAIL_PASSWORD is a Gmail App Password, not your regular Gmail password. Also confirm 2-Step Verification is enabled on the account.

No jobs found

  • LinkedIn may be throttling requests — the script uses random delays to minimize this.
  • Check logs/scraper.log for details.
  • Try running manually first: python main.py --dry-run

Task Scheduler not running

  • Check taskschd.msc → right-click the task → Run manually to test.
  • Ensure the task uses the correct Python path: python setup_scheduler.py --status.

⚠️ Legal Notice

Scraping LinkedIn is against their Terms of Service. This tool is for personal, educational use only. Use responsibly and at your own risk.

About

Advanced Job Intelligence & Search Framework built with Playwright and Python. Features native event simulation to bypass UI constraints and deterministic Boolean filtering for high-precision role targeting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages