jobs_scraper
jobs_scraper is a simple job postings scraper for the website Indeed, it is written in Python and is based on the requests and BeautifulSoup libraries.
Installation
Run the following to install the package:
pip install jobs_scraper
Usage
To use jobs_scraper you need to create a new JobsScraper object and provide the following attributes to its constructor:
country: prefix country.position: job position.location: job location.pages: number of pages to be scraped.
from jobs_scraper import JobsScraper
# Let's create a new JobsScraper object and perform the scraping for a given query.
scraper = JobsScraper(country="nl", position="Data Engineer", location="Amsterdam", pages=3)
df = scraper.scrape()
In this way, the first three pages for the example query "Data Engineer" based in "Amsterdam" on the Dutch version of the portal Indeed get scraped.
The scrape method returns a Pandas dataframe, therefore it is possible to export it into a csv file.
Additional Parameters
-
max_delay: bearing in mind that this package is meant only for educational purposes, a delay in the requests can be provided. By settingmax_delayin the constructor, every job posting will be randomly scraped in an interval between0andmax_delayseconds.scraper = JobsScraper(country="...", position="...", location="...", pages=..., max_delay=5)
-
full_urls: since most of the scraped job urls are pretty long, the returned Pandas dataframe will truncate them, making it not simple to access. Settingfull_urlstoTrue, the scraped urls will not be truncated.scraper = JobsScraper(country="...", position="...", location="...", pages=..., full_urls=True)
TODO
- Add rotating proxies to prevent the scraper from being blocked once too many requests are sent.
Metadata
Release files for jobs-scraper 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jobs_scraper-0.0.11.tar.gz | 4.6 kB | Details |
Release files / jobs_scraper-0.0.11.tar.gz
| Download URL | jobs_scraper-0.0.11.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec23632dfef4c8d4fb77d84b3285237299aa58e3a6a8bff1da093f469918dade
|
|
BLAKE2b-256 checksum How to use checksums |
a39bf75591d7c3af9e53febc22d8b65f42ac3c6c89110747e953eafaea152436
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9
|