Skip to main content

Package that automate selection and subscription of jobs

Project description

job-hunting

A automated job finder that find and subscribe in job

instalation

Installed via pip:

pip install job-hunting

or from source:

python setup.py

and make sure that you download chromedriver that matches your chrome browser version

and create a ".env" file in your root directory and input the chromdrive path on it

CHROMEDRIVER_PATH="Your chromedrive path"

Usage

with vagas.com

from jobhunting.Models.vagasCom import VagasCom


def searchVagasCom(targetJob, vagasUser, vagasPassword, headless):
    vagas = VagasCom(chromedriver_path="C:\Selenium\chromedriver.exe", headless=headless)
    targetJob = "bots"
    job_site = vagas.appName
    
    print(f'{job_site} Iniciando...')
    try:
        print(f'{job_site} Tentando logar...')
        if not vagas.login(vagasUser, vagasPassword):
            print(f'{job_site} Login inválido ou campos errados!')
            vagas.quitSearch()
            return 

        print(f'{job_site} logado com sucesso!')

        print(f'{job_site} A selecionar vaga...')
        vagas.insertJob(targetJob)
        print(f'{job_site} Vaga selecionada!')

        print(f'{job_site} A ajustar opções...')
        vagas.searchOptions()
        print(f'{job_site} Feito!')

        print(f'{job_site} Listando Vagas...')
        vagas.selectJobs()
        print(f'{job_site} Feito!')
        print(f"{len(vagas.targetLink)} vagas encontradas!")

        success = 0
        fail = 0
        print(f"{job_site} Se inscrevendo nas vagas...")
        
        try:
            for index, target in enumerate(vagas.targetLink):
                if target.startswith("https://") or target.startswith("http://"):
                    status = vagas.subscribeJob(target)
                    if status == "Vaga cadastrada!":
                        success += 1

                    else:
                        fail += 1

                    print(f"{job_site} {index + 1} vaga, status: {status}")
        
        except Exception:  
            print(f"{job_site} erro ao se inscrever!")
        
        finally:
            vagas.quitSearch()

        print(f'Vagas inscritas {success}')
        print(f'Vagas ja inscritas anteriomente ou requer preenchimento adicional: {fail}')

    except Exception as error:
        print("Algum problema ocorreu e/ou as informações estão erradas!")
        # vagas.quitSearch()
        raise

    except KeyboardInterrupt:
        print('Saindo, volte sempre!')
        vagas.quitSearch()
        

or with infojobs

from jobhunting.Models.Infojobs import Infojobs


def searchInfojob(jobTarget, user, password, headless):
    """
    Infojobs automatic subscription job

    :jobTarget: target job to subsscribe
    :login: infojobs user to login
    :password: password to login
    """
    jobs = Infojobs(chromedriver_path="Your chromedriver path", headless=headless)
    site_job = jobs.appName
    job_type = jobTarget

    try:
        print(f'{site_job} Iniciando...')
        print(f'{site_job} Tentando logar...')
        
        if not jobs.login(user, password):
            print(f"{site_job} Login inválido ou campos errados!")
            jobs.quitSearch()
            sys.exit()

        print(f'{site_job} Selecionando vaga...')
        jobs.searchList(job_type)
        print(f'{site_job} Feito!, buscando vagas para {site_job}')

        print(f'{site_job} Ajustando opções...')
        jobs.searchOptions()
        print(f"{site_job} Feito!")

        print(f'{site_job} Selecionando vagas disponiveis...')
        jobs.getJob()
        print(f'{site_job} {len(jobs.jobsLink)} Vagas selecionadas!')

        success = 0
        fail = 0
        print(f"{site_job} Se inscrevendo nas vagas...")
        
        for index, target in enumerate(jobs.jobsLink):
            if target.startswith("https://") or target.startswith("http://"):
                status = jobs.subscribeJob(target)
                if status == "Vaga cadastrada!":
                    success += 1

                else:
                    fail += 1

                print(f"{site_job} {index + 1} vaga, status: {status}")

        jobs.quitSearch()

        print(f'Vagas inscritas {success}')
        print(f'Vagas ja inscritas anteriomente ou requer preenchimento adicional: {fail}')

    except Exception as error:
        jobs.quitSearch()
        print("Algum problema ocorreu e/ou as inforamções estão erradas!")
        print(f"Erro {error}, contate o adminstrador do sistema")

    except KeyboardInterrupt:
        print('Saindo, volte sempre!')
        jobs.quitSearch()

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

job-hunting-0.2.18.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

job_hunting-0.2.18-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file job-hunting-0.2.18.tar.gz.

File metadata

  • Download URL: job-hunting-0.2.18.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for job-hunting-0.2.18.tar.gz
Algorithm Hash digest
SHA256 2bc067f5dea9e2158c0e73f18856fd17054975189c3a3f878960b947f60db1e2
MD5 33e713644434b1d4bea864f5c7f2d562
BLAKE2b-256 024859b845306f5ba2422bf013b7697dbe16838cb536ce2a414b2a95d2f2dd76

See more details on using hashes here.

File details

Details for the file job_hunting-0.2.18-py3-none-any.whl.

File metadata

  • Download URL: job_hunting-0.2.18-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for job_hunting-0.2.18-py3-none-any.whl
Algorithm Hash digest
SHA256 348bd8b6d4b01ec89fb8dc4b1977a360b1d606400504de8949f7434f2c4c2adf
MD5 cc0125b8c4934123c90a1074b76df7cf
BLAKE2b-256 389cc736b02963d48d00d7387cbb4a5533f22f7e4cc9ceb4734b1199febdde92

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