Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Back again! Issue on running #8

Open
mcsJDF01 opened this issue Mar 10, 2021 · 5 comments
Open

Back again! Issue on running #8

mcsJDF01 opened this issue Mar 10, 2021 · 5 comments

Comments

@mcsJDF01
Copy link

Hi again,
I have ran in to another issue, it looks like Selenium is struggling with the headless Chrome installed. I have updated recently and so it could be that its running in to a feature that has been removed:
Traceback (most recent call last):
File "/home/osint/LazyOSINT/./main.py", line 169, in
main()
File "/home/osint/LazyOSINT/./main.py", line 162, in main
lin = [ x.result() for x in concurrent.futures.as_completed( linkedinT ) ]
File "/home/osint/LazyOSINT/./main.py", line 162, in
lin = [ x.result() for x in concurrent.futures.as_completed( linkedinT ) ]
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 433, in result
return self.__get_result()
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/osint/LazyOSINT/lib/linkedinCompanyScraper.py", line 207, in scrapeThoseEmployeez
self.driver.find_element_by_xpath( see_employees_xpath ).click()
File "/home/osint/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/osint/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/home/osint/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/osint/.local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@Class="mt2"]"}
(Session info: headless chrome=88.0.4324.182)

@mcsJDF01
Copy link
Author

Command executed:
python3 main.py -f -u https://www.linkedin.com/company/ -e -p -b

@lapolis
Copy link
Owner

lapolis commented Mar 10, 2021

Hi there, are you running it with Python 3.8 or 3.9?

Edit: sorry, just realized, you are on Python3.9. I am aware that the multitasking is completely broken since 3.9. Do you get the same issue if you run in Python 3.8?

@mcsJDF01
Copy link
Author

Just tried that and yep same issue:
Traceback (most recent call last):
File "main.py", line 169, in
main()
File "main.py", line 162, in main
lin = [ x.result() for x in concurrent.futures.as_completed( linkedinT ) ]
File "main.py", line 162, in
lin = [ x.result() for x in concurrent.futures.as_completed( linkedinT ) ]
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/osint/LazyOSINT/lib/linkedinCompanyScraper.py", line 207, in scrapeThoseEmployeez
self.driver.find_element_by_xpath( see_employees_xpath ).click()
File "/home/osint/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/osint/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/home/osint/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/osint/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@Class="mt2"]"}
(Session info: headless chrome=88.0.4324.182)

@lapolis
Copy link
Owner

lapolis commented Mar 10, 2021

Just tried that and yep same issue:
Traceback (most recent call last):
File "main.py", line 169, in
.......
(Session info: headless chrome=88.0.4324.182)

Looks like Linkedin changed quiete a lot. I fix part of the issue but it will take a bit more time then the last time. Sorry for that.

@mcsJDF01
Copy link
Author

Not a problem at all thanks for coming back to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants