A python package to scrape jobs from ethiojobs.net
Project description
Asynchronous ethiojobs Scraper written with python3
Examples
What is this?
Asynchronous python3 Scrapper for ethiojobs.net
Installation
pip3 install -U git+https://github.com/wizkiye/pyethiojobs.git
Example Usage
from pyethiojobs import EthioJobs
from pyethiojobs.types import EmploymentType
ethiojobs = EthioJobs()
#Searching for jobs
async def main():
results = await ethiojobs.search(
"designer",
limit=10,
employment_type=EmploymentType.FULL_TIME
) # this will return list of jobs
for result in results:
print(result.title)
print(result.link)
# Getting list of categories
async def main():
categories = await ethiojobs.get_categories()
for category in categories:
print(category.name)
print(category.link)
await category.get_jobs() # this will return list of jobs in the category
# Getting list of jobs in a category
async def main():
jobs = await ethiojobs.get_category("category_link or Category Object")
for job in jobs:
print(job.title)
print(job.link)
# Getting the latest jobs
async def main():
jobs = await ethiojobs.get_latest_jobs()
for job in jobs:
print(job.title)
print(job.link)
# Getting Government jobs
async def main():
jobs = await ethiojobs.get_gov_jobs() # this will return list of GovJob
for job in jobs:
print(job.company)
print(job.link)
if __name__ == "__main__":
import asyncio
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Using Decorators
from pyethiojobs import EthioJobs, filters
from pyethiojobs.types import Job
ethiojobs = EthioJobs()
@ethiojobs.on_new_jobs()
async def new_job_handler(job: Job):
print(job.__dict__)
# this is not tested yet :D
@ethiojobs.on_new_jobs(
filters.valid_through(20)
& filters.work_place("Addis Ababa")
& ~filters.hiring_organization("Ethio Telecom")
)
async def new_filtered_job_handler(job: Job):
print(job.__dict__)
if __name__ == '__main__':
ethiojobs.run(poll_interval=30)
Contributing
If you want to contribute to this project, please read the CONTRIBUTING.md file.
License
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
- ethiojobs for providing the data
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 pyEthioJobs-0.0.8.tar.gz.
File metadata
- Download URL: pyEthioJobs-0.0.8.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16438468b9021a8ce5f48cbc782db8fc96dfc7a9ca10c676c16226b6639b34f9
|
|
| MD5 |
fa03d58891e1e28ba5d0a9e5ec31c511
|
|
| BLAKE2b-256 |
63a30df54b282c5202b913d8353940692e49371a13fe54ca02b8d5c6f82d633e
|
File details
Details for the file pyEthioJobs-0.0.8-py3-none-any.whl.
File metadata
- Download URL: pyEthioJobs-0.0.8-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166acaf65dadfe904d413734fa065a1689654d38c287e8e93b44565be98a3e09
|
|
| MD5 |
1d308e00b699f4e6d8c424fd05f898de
|
|
| BLAKE2b-256 |
b2e62300167bc0112f7371fe8e4a239bffa3d7b1e2a6a3b630fc305233420e1d
|