Merge pull request #277 from spectreDeveloper/v3
This commit is contained in:
commit
74b0be8b16
1 changed files with 8 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ import json
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
class LinkedInEvolvedAPI(Linkedin):
|
class LinkedInEvolvedAPI(Linkedin):
|
||||||
|
already_applied_jobs: List[str] = []
|
||||||
|
|
||||||
def __init__(self, username, password):
|
def __init__(self, username, password):
|
||||||
super().__init__(username, password)
|
super().__init__(username, password)
|
||||||
|
|
||||||
|
|
@ -351,6 +353,8 @@ class LinkedInEvolvedAPI(Linkedin):
|
||||||
|
|
||||||
# Push the commit to the repository and create a pull request to the v3 branch.
|
# Push the commit to the repository and create a pull request to the v3 branch.
|
||||||
|
|
||||||
|
def set_job_as_applied(self, job_id: str) -> None:
|
||||||
|
self.already_applied_jobs.append(job_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -364,6 +368,9 @@ if __name__ == "__main__":
|
||||||
jobs = api.search_jobs(keywords="Frontend Developer", location_name="Italia", limit=5, easy_apply=True, offset=1)
|
jobs = api.search_jobs(keywords="Frontend Developer", location_name="Italia", limit=5, easy_apply=True, offset=1)
|
||||||
for job in jobs:
|
for job in jobs:
|
||||||
job_id: str = job["job_id"]
|
job_id: str = job["job_id"]
|
||||||
|
if job_id in api.already_applied_jobs:
|
||||||
|
logging.info(f"Already applied to job {job_id}, skipping it")
|
||||||
|
continue
|
||||||
|
|
||||||
fields = api.get_fields_for_easy_apply(job_id)
|
fields = api.get_fields_for_easy_apply(job_id)
|
||||||
for field in fields:
|
for field in fields:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue