A command-line tool to automate job applications and scraping on OnlineJobs.ph
Project description
OnlineJobs.ph CLI
A command-line tool to automate job applications and scraping on OnlineJobs.ph.
Features
- Login: Authenticate with OnlineJobs.ph and export session cookies
- Apply: Automatically apply to job postings with custom messages and contact info
- Jobs: Search and scrape job listings with descriptions
Installation
Requirements
- Python 3.11+
Option 1: Install from PyPI (Recommended)
pip install olj-cli
This will install the olj-cli command-line tool globally.
Option 2: Clone and Install from Source
git clone https://github.com/Kuugang/olj-cli.git
cd olj-cli
pip install -e .
This will install the package in development mode.
Example Usage
1. Login — Get Session Cookies
Authenticate and save your session cookies for use in other commands.
COOKIES=$(olj-cli login --email you@example.com --password secret)
This prints the cookies as JSON to stdout, which you can store in the COOKIES variable.
2. Apply to a Job
Submit an application to a specific job posting.
olj-cli apply \
--cookies "$COOKIES" \
--job-url "https://www.onlinejobs.ph/jobseekers/job/1604447" \
--subject "Applying for Senior Developer" \
--message "I would like to apply, thank you." \
--contact-info "Email: you@example.com | GitHub: yourhandle"
Parameters:
--cookies: JSON cookies string from thelogincommand--job-url: Full URL of the job posting--subject: Email subject line--message: Email message body--contact-info: Your contact information--apply-points(optional): Points to spend (default: 1)
3. Scrape Jobs
Search and scrape job listings with full descriptions.
olj-cli jobs --filter "python developer" --pages 3
Parameters:
--filter(optional): Keyword filter for search--pages(optional): Number of pages to scrape (if not specified, scrapes until no jobs found)
Output: JSON array of jobs with url, title, posted_by, posted_on, rate, and description
Commands
login
Authenticate with OnlineJobs.ph and output session cookies as JSON.
olj-cli login --email <email> --password <password>
Environment Variables:
OLJ_EMAIL: Account email (alternative to--email)OLJ_PASSWORD: Account password (alternative to--password)
apply
Apply to a job posting using authenticated session.
olj-cli apply --cookies <JSON> --job-url <url> --subject <subject> --message <message> --contact-info <info>
jobs
Search and scrape job listings.
olj-cli jobs [--filter <keyword>] [--pages <number>]
Debug
Enable debug logging for any command:
olj-cli --debug jobs --filter "react"
Example Workflow
# 1. Search for jobs (no authentication needed)
olj-cli jobs --filter "python developer" --pages 3
# 2. Login to get cookies (if you want to apply)
COOKIES=$(olj-cli login --email you@example.com --password secret)
# 3. Apply to a specific job
olj-cli apply \
--cookies "$COOKIES" \
--job-url "https://www.onlinejobs.ph/jobseekers/job/1604447" \
--subject "Applying for Senior Developer" \
--message "I would like to apply, thank you." \
--contact-info "Email: you@example.com | GitHub: yourhandle"
How It Works
Login Flow
- Fetches the login page to extract CSRF token
- Submits credentials to authenticate endpoint
- Stores session cookies for subsequent requests
Apply Flow
- Fetches the job posting page
- Extracts CSRF token, job ID, and other metadata
- Fetches the application form
- Submits the application with subject, message, and contact info
Jobs Scraping
- Fetches job listing pages with optional keyword filter
- Parses job cards to extract title, URL, poster, and date
- Fetches each job's detail page to extract full description
- Returns complete job data as JSON
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file olj_cli-0.1.1.tar.gz.
File metadata
- Download URL: olj_cli-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c265459ed04647b63966bc2b6f03010138005c0c5df7b6d0db0812b1f578e851
|
|
| MD5 |
0541e14afc273b8d4adc7f15620f6159
|
|
| BLAKE2b-256 |
3661a6799b161ae6e84fd93c2ba1ec279329a13188a3a507e6d07d002b035d57
|
File details
Details for the file olj_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: olj_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f67149b93876484b7d244314d207ead112c68f303eecfdffe1be6e7c9b7fab56
|
|
| MD5 |
f68e7ebcf3f92c1d9faa383e2b1af982
|
|
| BLAKE2b-256 |
80e15de6133555b0021a6d4fa0330b64cebd526f0bb7c057f32b424bbfef81c0
|