A production-ready job search application that scrapes real jobs from LinkedIn and TimesJobs, with intelligent ranking using data structures and algorithms.
- Uses a max-heap (priority queue) to rank jobs by weighted score
- Balances multiple factors: salary, company revenue, competition, urgency, and resume match
- Score Formula:
score = w1×salary + w2×revenue - w3×applicants + w4×urgency + w5×match - Efficient O(n) heap construction and O(k log n) top-k extraction
- Trie (Prefix Tree) for instant autocomplete suggestions
- Inverted Index for fast keyword matching across job titles, skills, and descriptions
- Query processing in O(m×ℓ) where m = keywords, ℓ = average list size
- Supports queries like "python remote senior" with intersection of matching jobs
- Salary Parsing: Extracts and normalizes salary values from various formats
- Company Revenue: Database of 50+ companies with real revenue data for scoring
- Applicant Count: Extracts or estimates competition level
- Deadline Detection: Parses application deadlines and calculates urgency scores
- Urgency Formula:
urgency = 1 / (1 + days_left)- closer deadlines get higher priority
- Upload PDF/DOCX resumes for intelligent job matching
- Extracts skills, experience, and education from resumes
- Calculates match scores based on:
- Skills overlap (40% weight)
- Experience fit (30% weight)
- Job title similarity (20% weight)
- Location preference (10% weight)
- Auto-extracts job titles from resume content
- Scrapes actual jobs from LinkedIn and TimesJobs
- Extracts: title, company, location, salary, experience, skills, descriptions
- Handles multiple HTML structures with fallback selectors
- Respectful scraping with delays and proper headers
-
Max-Heap (Priority Queue)
- Efficiently ranks jobs by composite score
- Python's
heapqwith negated scores for max-heap behavior
-
Trie (Prefix Tree)
- Fast autocomplete: O(L) where L = prefix length
- Stores job IDs at each node for quick retrieval
-
Inverted Index
- Maps keywords → set of job IDs
- Enables fast multi-keyword search with set intersection
-
Hash Maps
- Company revenue database for O(1) lookups
- Job cache for quick access by ID
weights = {
'salary': 0.30, # Higher salary = better
'revenue': 0.25, # Bigger company = more stable
'applicants': 0.20, # Fewer applicants = less competition
'urgency': 0.15, # Closer deadline = more urgent
'match': 0.10 # Resume match bonus
}pip install requests beautifulsoup4 flask PyPDF2 python-docx scikit-learn numpy- Web Interface (Recommended):
python simple_web_app.pyThen open http://localhost:5000 in your browser
- Command Line:
python simple_job_search.py- Run Tests:
# Test all advanced features
python test_advanced_features.py
# Test resume parsing
python test_resume_parsing.py
# Create sample resume
python test_resume_sample.py- Basic Search: Enter job title and location
- Resume Upload: Drag & drop your resume for AI matching
- Keyword Filter: Use "python remote senior" to filter results
- View Rankings: Jobs are automatically ranked by priority score
from simple_job_search import SimpleJobSearch
# Initialize searcher
searcher = SimpleJobSearch()
# Search jobs
jobs = searcher.search_jobs("Python Developer", "Bangalore")
# Parse resume
resume_data = searcher.parse_resume("my_resume.pdf")
# Rank jobs with resume matching
ranked_jobs = searcher.rank_jobs_by_resume(jobs, resume_data)
# Fast keyword search
searcher.build_search_index(jobs)
filtered_jobs = searcher.fast_keyword_search("python remote")
# Get autocomplete suggestions
suggestions = searcher.trie.autocomplete("pyt")User Query → Scrape LinkedIn & TimesJobs → Extract Job Data
↓
Build Search Index (Trie + Inverted Index)
↓
Apply Keyword Filters (if any)
↓
Calculate Priority Scores (salary, revenue, applicants, urgency)
↓
Apply Resume Matching (if resume uploaded)
↓
Rank with Max-Heap → Return Top Jobs
For each job:
- Salary Score: Extract numeric value, normalize to 0-100
- Revenue Score: Lookup company in database, normalize with log scale
- Applicant Penalty: More applicants = lower score (inverted)
- Urgency Score: Calculate from deadline using
1/(1+days_left) - Match Score: Resume similarity (if available)
- Weighted Sum: Combine all factors with configured weights
- Parse resume (PDF/DOCX) → Extract text
- Extract skills using pattern matching
- Extract experience years and education
- For each job:
- Calculate skills overlap
- Compare experience requirements
- Compute title similarity (TF-IDF)
- Generate composite match score
- Combine with priority score for final ranking
├── simple_job_search.py # Core search engine with all algorithms
├── simple_web_app.py # Flask web application
├── templates/
│ └── simple_search.html # Web interface
├── uploads/ # Resume storage
├── test_advanced_features.py # Comprehensive test suite
├── test_resume_parsing.py # Resume parsing tests
├── test_resume_sample.py # Sample resume generator
└── README.md # This file
Edit simple_job_search.py:
self.weights = {
'salary': 0.3, # Increase for salary-focused search
'revenue': 0.25, # Increase for big company preference
'applicants': 0.2, # Increase to avoid competitive jobs
'urgency': 0.15, # Increase for urgent applications
'match': 0.1 # Increase for resume-focused search
}Add to company_revenue dictionary in simple_job_search.py:
self.company_revenue = {
'your_company': 50000, # Revenue in millions USD
# ... more companies
}| Feature | Data Structure | Time Complexity | Space Complexity |
|---|---|---|---|
| Priority Ranking | Max-Heap | O(n) build, O(k log n) extract | O(n) |
| Autocomplete | Trie | O(L) where L = prefix length | O(N×M) where N = words, M = avg length |
| Keyword Search | Inverted Index | O(m×ℓ) where m = keywords, ℓ = list size | O(N×K) where K = unique words |
| Resume Matching | TF-IDF + Cosine | O(n×d) where d = vocabulary size | O(n×d) |
- No Mock Data: Uses actual job postings from real websites
- Production Patterns: Implements data structures used by real job platforms
- Scalable Design: Efficient algorithms that work with large datasets
- Practical Scoring: Balances multiple real factors (not just keyword matching)
- Modular Code: Separate concerns (scraping, ranking, matching)
- Error Handling: Graceful fallbacks when scraping fails
- Type Hints: Clear function signatures
- Documentation: Comprehensive comments and docstrings
- Testing: Full test suite covering all features
- Database integration (PostgreSQL) for job persistence
- User accounts and saved searches
- Email alerts for new matching jobs
- More job sources (Indeed, Naukri, etc.)
- Advanced NLP with transformers for better matching
- Job application tracking
- Salary prediction ML model
- Company reviews integration
This project is for educational purposes. Respect website terms of service when scraping.
This is a demonstration project showing real software engineering techniques. Feel free to learn from and adapt the code!
This project demonstrates:
- Real data structures (Heap, Trie, Inverted Index) in production
- Practical algorithms for ranking and search
- Web scraping with error handling
- Machine learning for text similarity
- Clean, maintainable code architecture
- Full-stack development (Python backend + HTML/JS frontend)
Built to be actually useful, not just a portfolio piece! 🎯