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
- Proxy Support: Route requests through HTTP/HTTPS proxies (with optional authentication)
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" # Scrape first page only
olj-cli jobs --filter "python developer" --all # Scrape all pages
olj-cli jobs --all --page 2 # Start from page 2 and scrape all
Parameters:
--filter(optional): Keyword filter for search--page(optional): Starting page number (default: 1)--all(optional): Scrape all pages until no jobs found (default: only first page)
Output: JSON array of jobs with url, title, posted_by, posted_on, rate, and description
Commands
All commands support the --proxy option for routing through proxies.
login
Authenticate with OnlineJobs.ph and output session cookies as JSON.
olj-cli [--proxy <proxy>] 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 [--proxy <proxy>] apply --cookies <JSON> --job-url <url> --subject <subject> --message <message> --contact-info <info>
jobs
Search and scrape job listings.
olj-cli [--proxy <proxy>] jobs [--filter <keyword>] [--page <number>] [--all]
Proxy Configuration
All commands support HTTP/HTTPS proxies. Use the --proxy argument in format:
- Without authentication:
host:port - With authentication:
host:port:username:password
Examples
# Login through proxy (no auth)
olj-cli --proxy "proxy.example.com:8080" login --email you@example.com --password secret
# Apply to job through authenticated proxy
olj-cli --proxy "proxy.example.com:8080:user:pass" 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"
# Scrape jobs through proxy
olj-cli --proxy "10.0.0.1:3128:admin:password123" jobs --filter "python" --all
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" --all
# 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
Metadata
Release files for olj-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| olj_cli-0.3.0.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| olj_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / olj_cli-0.3.0.tar.gz
| Download URL | olj_cli-0.3.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01bf70425229fdf5c66ac44d20d723e518db81489bf3ea9f47f7151337fc5409
|
|
BLAKE2b-256 checksum How to use checksums |
a3fe5a1d19f19756b584e33a867e54fc39128fb956a264e552ebb0b555e66261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / olj_cli-0.3.0-py3-none-any.whl
| Download URL | olj_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c2eb4b6cd414467e1e6f33e979e4f32f2ae4d0e5a736fbc78e59d10d2dc3ec1
|
|
BLAKE2b-256 checksum How to use checksums |
ca7690c45f1fe332e18dc273daf825b1afbe00e73e22d9e6ff0d995e2fd5c809
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|