NathanDuma / LinkedIn-Easy-Apply-Bot

Automate LinkedIn Easy Apply job applications and answer application-specific questions.
223 stars 84 forks source link

After one apply, the bot cant continue #26

Open BarakOren opened 2 years ago

BarakOren commented 2 years ago

Hey! First let me thank you for this, its crazy.

so, the bot is going for one apply successfully, after that he loops thro all the over jobs and returns this message for each job post: Could not apply to the job! Traceback (most recent call last): File "C:\Users\Desktop\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 167, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') File "C:\Users\shaha\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 447, in find_element_by_class_name return self.find_element(by=By.CLASS_NAME, value=name) File "C:\Users\shaha\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 735, in find_element return self._execute(Command.FIND_CHILD_ELEMENT, File "C:\Users\shaha\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute return self._parent.execute(command, params) File "C:\Users\shaha\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute self.error_handler.check_response(response) File "C:\Users\shaha\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: chrome=99.0.4844.74) Stacktrace: Backtrace: Ordinal0 [0x00659943+2595139] Ordinal0 [0x005EC9F1+2148849] Ordinal0 [0x004E4528+1066280] Ordinal0 [0x004E6E04+1076740] Ordinal0 [0x004E6CBE+1076414] Ordinal0 [0x004E6F50+1077072] Ordinal0 [0x00510D1E+1248542] Ordinal0 [0x005111CB+1249739] Ordinal0 [0x005074F1+1209585] Ordinal0 [0x0052BA34+1358388] Ordinal0 [0x00507474+1209460] Ordinal0 [0x0052BC04+1358852] Ordinal0 [0x0053BAF2+1424114] Ordinal0 [0x0052B806+1357830] Ordinal0 [0x00506086+1204358] Ordinal0 [0x00506F96+1208214] GetHandleVerifier [0x007FB232+1658114] GetHandleVerifier [0x008B312C+2411516] GetHandleVerifier [0x006EF261+560433] GetHandleVerifier [0x006EE366+556598] Ordinal0 [0x005F286B+2173035] Ordinal0 [0x005F75F8+2192888] Ordinal0 [0x005F76E5+2193125] Ordinal0 [0x006011FC+2232828] BaseThreadInitThunk [0x7646FA29+25] RtlGetAppContainerNamedObjectPath [0x77457A7E+286] RtlGetAppContainerNamedObjectPath [0x77457A4E+238]

and after all of that: "Could not apply to the job! Applying to jobs on this page has been completed! Sleeping for 683.3301115036011 seconds."

any ideas why this happens??

NathanDuma commented 2 years ago

Try restarting the bot. It sounds like the page refreshed or changed.

BarakOren commented 2 years ago

Didnt work, I guess its because I changed a few things in def next_job_page It didnt get the parameters from the config.yaml file, so i put it in there myself. ( I mean, it did not get the positions or locations i wrote. )

So the result looks like this def next_job_page(self, position, location, job_page): self.browser.get("https://www.linkedin.com/jobs/search/" + self.base_search_url + "&keywords=" +"frontend"+"germany"+"&start="+str(job_page*25)) self.avoid_lock()

    you think thats it?
f1rstxlas7 commented 2 years ago

Conversely, I haven't touched the code at all but I still ran into the same issue that BarakOren posted above. It seems to be intermittent, however. Sometimes it'll apply to every job on a page and move on successfully and sometimes it'll throwback that error, go to sleep, and move on without applying.

Just want to add that this is an incredible tool, btw. My interview to application rate is about 5%, but I'm sure this will vary depending upon who's using it, their experience, and industry.

AllainDB commented 2 years ago

I'm having the same problem. Because of this the bot is basically only applying to 1 job every 12 minutes or so.

I noticed after completing an app a small LinkedIn window pops up about taking assessments. Is that messing with the bot maybe?

docoined commented 2 years ago

It all worked perfectly. Thanks

NathanDuma commented 2 years ago

Are any of the job listing pages refreshing randomly for any of you? Do you know what happens before/after the failures?

NathanDuma commented 2 years ago

My best guess is maybe try copying this line into the loop: ` job_list = self.browser.find_elements_by_class_name('jobs-search-resultslist')[0].find_elements_by_class_name('jobs-search-resultslist-item' then change the loop to iterate by index. I assume that the page is refreshing for some reason and the job tile elements are no longer are on the page.

zszszz commented 2 years ago

The above code modification suggestion did not work. Still same problem as poster

zszszz commented 2 years ago

Has anybody else found a fix? It is really really hindering the efficiency and how many applications the bot can send out in one run

zszszz commented 2 years ago

Would this be the right code?

for job_tile in range(24): job_list = self.browser.find_elements_by_class_name('jobs-search-resultslist')[0].find_elements_by_class_name('jobs- search-resultslist-item')

Receive below error with above code Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Traceback (most recent call last): File "C:\Users\steph\source\LinkedIn-Easy-Apply-Bot-master\linkedineasyapply.py", line 174, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-listtitle') AttributeError: 'int' object has no attribute 'find_element_by_class_name' Could not apply to the job! Applying to jobs on this page has been completed! Sleeping for 804.8069152832031 seconds.

mikemac68 commented 2 years ago

Are any of the job listing pages refreshing randomly for any of you? Do you know what happens before/after the failures?

I'm having the same issue as above. After the "submit application" button is pressed a pop up for either a skill assessment, try LinkedIn premium or confirmation window pops up. after that I can see the list of jobs refresh on the main screen then i get same errors as above then it enters the sleep before going on to the next page and repeats

naanrdk commented 2 years ago

So I found a way around it, in the code search for time.sleep() replace the time with 2-3 sec this will then apply for at first instance apply for the first job in the list then go to the next page apply for the first job and so on. Replace the position with different keywords you'll get the result except it would require more human intervention.

shivapbhusal commented 2 years ago

I also get the same error. Following this chat.

Traceback (most recent call last): File "/Users/shivabhusal/Documents/Programming/LinkedIn-Easy-Apply-Bot/linkedineasyapply.py", line 167, in apply_jobs job_el = job_tile.find_element_by_class_name('job-card-list__title') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 398, in find_element_by_class_name return self.find_element(by=By.CLASS_NAME, value=name) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 659, in find_element {"using": by, "value": value})['value'] File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: chrome=102.0.5005.115)

soychristophe commented 2 years ago

Hello, did you know how to correct the error of only applying to one job offer per page? Thank you

ozturkoktay commented 2 years ago

Experiencing the same issue, any solution?