NathanDuma / LinkedIn-Easy-Apply-Bot

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

Program fails to apply for any of the jobs found on page #55

Open terminalone opened 1 year ago

terminalone commented 1 year ago

Going to job page 0 [23860:23844:1101/221711.693:ERROR:device_event_log_impl.cc(214)] [22:17:11.693] USB: usb_service_win.cc:104 SetupDiGetDeviceProperty({{A45C254E-DF1C-4EFD-8020-67D146A850E0}, 6}) failed: Element not found. (0x490) Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 80, in start_applying self.next_job_page(position, location_url, job_page_number) File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 730, in next_job_page self.browser.get("https://www.linkedin.com/jobs/search/" + self.base_search_url + File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 430, in get self.execute(Command.GET, {'url': url}) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 416, in execute response = self.command_executor.execute(driver_command, params) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\remote_connection.py", line 398, in execute return self._request(command_info[0], url, body=data) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\remote\remote_connection.py", line 420, in _request resp = self._conn.request(method, url, body=body, headers=headers) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\request.py", line 78, in request return self.request_encode_body( File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\request.py", line 170, in request_encode_body return self.urlopen(method, url, extra_kw) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "C:\Users\parag\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\http\client.py", line 1374, in getresponse response.begin() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\http\client.py", line 318, in begin version, status, reason = self._read_status() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) KeyboardInterrupt Sleeping for 616.1171405315399 seconds. Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py", line 128, in bot.start_applying() File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 103, in start_applying time.sleep(time_left) KeyboardInterrupt ^C D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>.git

D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>python3 main.py D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py:16: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options) D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py:16: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options)

DevTools listening on ws://127.0.0.1:60803/devtools/browser/2cc5e7b0-f2ef-4c09-89eb-340ca0de4376 [3624:7976:1101/221845.778:ERROR:device_event_log_impl.cc(214)] [22:18:45.779] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [3624:7976:1101/221845.792:ERROR:device_event_log_impl.cc(214)] [22:18:45.793] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) Starting the search for n in a. Going to job page 0 Starting the application process for this page... Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 127, in apply_jobs self.scroll_slow(job_results) File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 680, in scroll_slow time.sleep(random.uniform(1.0, 2.6)) KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 83, in start_applying self.apply_jobs(location) File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 132, in apply_jobs raise Exception("No more jobs on this page") Exception: No more jobs on this page Sleeping for 865.3519446849823 seconds. Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py", line 128, in bot.start_applying() File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 103, in start_applying time.sleep(time_left) KeyboardInterrupt ^C D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>

D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>

D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>

D:\LinkedinBot\LinkedIn-Easy-Apply-Bot>python3 main.py D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py:16: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options) D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py:16: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options)

DevTools listening on ws://127.0.0.1:60994/devtools/browser/0fc935e8-2e6a-48c6-baab-3ddce0284093 [27024:21044:1101/222241.388:ERROR:device_event_log_impl.cc(214)] [22:22:41.388] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [27024:21044:1101/222241.391:ERROR:device_event_log_impl.cc(214)] [22:22:41.390] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) Starting the search for e in o. Going to job page 0 Starting the application process for this page... [27024:10992:1101/222335.902:ERROR:util.cc(129)] Can't create base directory: C:\Program Files\Google\GoogleUpdater [24428:17900:1101/222436.811:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is disabled, ANGLE is Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 130, in apply_jobs job_list = self.browser.find_elements_by_class_name('jobs-search-resultslist')[0].find_elements_by_class_name('jobs-search-resultslist-item') IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 83, in start_applying self.apply_jobs(location) File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 132, in apply_jobs raise Exception("No more jobs on this page") Exception: No more jobs on this page Sleeping for 802.3499505519867 seconds. Traceback (most recent call last): File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\main.py", line 128, in bot.start_applying() File "D:\LinkedinBot\LinkedIn-Easy-Apply-Bot\linkedineasyapply.py", line 103, in start_applying time.sleep(time_left) KeyboardInterrupt ^C

faranha commented 1 year ago

Hey, I am having the same problem while executing. Not sure how to fix it. Already adjusted all "find element by.", but stuck on this part.

signor-mike commented 1 year ago

@terminalone @faranha The issue is caused because LinkedIn renamed class of one element.

The following solution fixed the issue for me: pip install selenium==4.2.0 --force-reinstall as suggested by https://github.com/NathanDuma/LinkedIn-Easy-Apply-Bot/issues/47

In the linkedineasyapply.py on lines 124 and 128 replace the following:

self.browser.find_element_by_class_name("jobs-search-results")

with

self.browser.find_element_by_class_name("scaffold-layout__list-container")