Skip to main content

Simple wrapper for crawling jobs data at Stack Overflow Jobs portal.

Project description

stackoverflow-jobs

Simple wrapper for crawling jobs data at Stack Overflow Jobs portal.

Basic usage

Creating a query is pretty straightforward:

from stackoverflow_jobs.query import Query

q = Query()

All query filters are available inside filters module. In case you want to add new filters, all you need to do is to append them to the Query object:

from stackoverflow_jobs.query import Query
from stackoverflow_jobs.filters import Role, Remote, Description

q = Query() \
    + Description("Android Developer") \
    + Remote() \
    + Role([Role.Type.MOBILE])

After you build your query, call execute() to fetch the data:

data = q.execute()

By default, queries requests are timed out after 60 seconds. You can change the timeout value in two different ways:

  1. Query(timeout): Every query will end up after the specified timeout.
  2. execute(timeout): Set up timeout for a specific query execution.
q1 = Query()   # Timeout default value: 60 seconds
q2 = Query(25) # Timeout custom value: 25 seconds

q1.execute()  # timeout: 60 seconds
q2.execute()  # timeout: 25 seconds

q1.execute(5) # timeout: 5 seconds
q2.execute(5) # timeout: 5 seconds

Important note: The library queries Stack Overflow Jobs RSS feed. This means that you need to parse the XML afterwards.

You can also retrieve the query URL using build_query() method, in case you need to:

q.build_query()
>>> 'https://stackoverflow.com/jobs/feed?q=Android+Developer&r=true&dr=MobileDeveloper'

Installing

stackoverflow-jobs is available in pypi repository:

pip install stackoverflow-jobs

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

stackoverflow-jobs-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stackoverflow_jobs-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file stackoverflow-jobs-0.1.0.tar.gz.

File metadata

  • Download URL: stackoverflow-jobs-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for stackoverflow-jobs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4c9c952cee4fb351ed50d075f3b61bbf615b47d0dd10b0295dcc84da853ae70
MD5 8d7ecb29142052c858e2588dea1e206f
BLAKE2b-256 7651b718d029cdc88f2aff6a28ed419eebf37fb30d973ae90bb205ce05e4f2cf

See more details on using hashes here.

File details

Details for the file stackoverflow_jobs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stackoverflow_jobs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for stackoverflow_jobs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1976f819331a4e3d35f847aca3a8d1d00a2743075f7b3578a8d9dd43c6523421
MD5 68e85c6495c73db8283b08fb18f548ac
BLAKE2b-256 83250bd5e4279f0a30ec0307ca20e90999d6683bd3b0eb802a7f9ecc50ce2425

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page