-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick Fix for LinkedIn Automation + GPTParser + undetected-chromedriver #972
Quick Fix for LinkedIn Automation + GPTParser + undetected-chromedriver #972
Conversation
Remove unused import statement as it causes tkinter error Co-authored-by: cjbbb <[email protected]> Co-authored-by: Axedyson <[email protected]>
the changed job_manager can work well to "applied job" pages.
Still have bugs, but can work based on it
Changed to f-string
Fixed the question_text error
@surapuramakhil do you have an account test on it? |
I just tried it on a fresh install of your branch, I'm still getting the error of No job results found on page :/ 2024-11-30 03:11:14.148 | DEBUG | ai_hawk.bot_facade:start_login:73 - Login process completed successfully
2024-11-30 03:11:14.148 | INFO | __main__:create_and_run_bot:194 - Applying
2024-11-30 03:11:14.149 | DEBUG | ai_hawk.bot_facade:start_apply:76 - Starting apply process
2024-11-30 03:11:14.149 | DEBUG | ai_hawk.bot_facade:validate_state:19 - Validating AIHawkBotState with required keys: ['logged_in', 'job_application_profile_set', 'gpt_answerer_set', 'parameters_set']
2024-11-30 03:11:14.149 | DEBUG | ai_hawk.bot_facade:validate_state:24 - State validation passed
2024-11-30 03:11:14.150 | DEBUG | ai_hawk.job_manager:start_applying:136 - Starting job application process
2024-11-30 03:11:14.150 | DEBUG | ai_hawk.linkedIn_easy_applier:__init__:48 - Initializing AIHawkEasyApplier
2024-11-30 03:11:14.150 | DEBUG | ai_hawk.linkedIn_easy_applier:_load_questions_from_json:63 - Loading questions from JSON file: answers.json
2024-11-30 03:11:14.151 | WARNING | ai_hawk.linkedIn_easy_applier:_load_questions_from_json:76 - JSON file not found, returning empty list
2024-11-30 03:11:14.151 | DEBUG | ai_hawk.linkedIn_easy_applier:__init__:59 - AIHawkEasyApplier initialized successfully
2024-11-30 03:11:14.151 | DEBUG | ai_hawk.job_manager:start_applying:148 - Starting the search for Software engineer in United States.
2024-11-30 03:11:14.151 | DEBUG | ai_hawk.job_manager:start_applying:154 - Going to job page 0
2024-11-30 03:11:14.152 | DEBUG | ai_hawk.job_manager:next_job_page:453 - Navigating to next job page: Software engineer in &location=United States, page 0
2024-11-30 03:11:20.313 | DEBUG | ai_hawk.job_manager:start_applying:157 - Starting the application process for this page...
2024-11-30 03:11:20.340 | WARNING | ai_hawk.job_manager:get_jobs_from_page:276 - No job results found on the page.
expection: Traceback (most recent call last):
File "C:\Users\yoris\Desktop\test\Auto_Jobs_Applier_AI_Agent\src\ai_hawk\job_manager.py", line 258, in get_jobs_from_page
jobs_container = self.driver.find_element(By.XPATH, jobs_xpath_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yoris\Desktop\test\Auto_Jobs_Applier_AI_Agent\virtual\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 831, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yoris\Desktop\test\Auto_Jobs_Applier_AI_Agent\virtual\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "C:\Users\yoris\Desktop\test\Auto_Jobs_Applier_AI_Agent\virtual\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//ul[contains(@class, 'scaffold-layout__list-container')]"}
(Session info: chrome=131.0.6778.86)
Stacktrace:
GetHandleVerifier [0x006F33E3+25059]
(No symbol) [0x0067CDE4]
(No symbol) [0x0055BEC3]
(No symbol) [0x0059FD86]
(No symbol) [0x0059FFCB]
(No symbol) [0x005DD952]
(No symbol) [0x005C1F44]
(No symbol) [0x005DB51E]
(No symbol) [0x005C1C96]
(No symbol) [0x00593FAC]
(No symbol) [0x00594F3D]
GetHandleVerifier [0x009E5543+3113795]
GetHandleVerifier [0x009FA20A+3198986]
GetHandleVerifier [0x009F29E2+3168226]
GetHandleVerifier [0x00793250+680016]
(No symbol) [0x0068572D]
(No symbol) [0x006829D8]
(No symbol) [0x00682B75]
(No symbol) [0x006757D0]
BaseThreadInitThunk [0x763B7BA9+25]
RtlInitializeExceptionChain [0x77B0C0CB+107]
RtlClearBits [0x77B0C04F+191]
2024-11-30 03:11:20.340 | DEBUG | ai_hawk.job_manager:start_applying:162 - No more jobs found on this page. Exiting loop.
Sleeping for 53.80948352813721 seconds. Press 'y' to skip waiting. Timeout 60 seconds :
2024-11-30 03:12:20.376 | DEBUG | ai_hawk.job_manager:start_applying:224 - Sleeping for 53.80948352813721 seconds as user chose not to skip. |
That must be a different code because that error must be on line 260. Do a pull from the PR. Put your LLM type and credentials (config.py), and do a |
I am getting this error, can you fix this as well? @surapuramakhil @BeniaminC |
It seems that some people's format don't have "COMPANY · LOCATION" in their job listings. Can you send me the format of location in the job listing? |
working fine now, Thank you! <3 |
It seems like you did a PR pull from #961 before. There is a typo where he put a period character Glad it is working for you now. |
@BeniaminC Still very very istabile, I put in undetected-chromedriver, and at the same time I created a GPTparser to use for parsing operations via LLM |
Working like a charm. Thanks mate! |
Anyone else experiencing the bot saying that its applying to a position but it doesnt and moves on to the next?
|
That looks fine. Some pages don't have recruiters. |
I just didnt see any logs where it filled out the form and also didnt observe it do so on the browser.
|
@BeniaminC If the page has no recruiters, you should not stop the whole thing |
The bug is not the execution itself. The logger was not properly logging the output. It should be fixed now. The GPT Parser was using it's own logger. The latest commit fixed this. This means that the code was executing correctly as before, you just didn't see it. It was irrelevant whether there was a recruiter or not. TL;DR: someone copied and pasted code into a file but forgot to remove the imports. |
I think its the is_job_suitable() function. I dont see the code for it so im not sure what its doing. But I dont see the logs statements print out to terminal after this section. Its working after commenting out. Seems it deemed most of the job postings are not suitable. Perhaps I setup something incorrectly. # Todo: add this job to skip list with it's reason
if not self.gpt_answerer.is_job_suitable():
return |
Fetched from PR #961 . However, some minor things were not working as described below.
It seems to be working perfectly fine now. it applies to at least 80% of the jobs. Tested with 100+ jobs.