-
Notifications
You must be signed in to change notification settings - Fork 600
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
TimeoutException #232
Comments
@jdtibochab , thanks for opening this issue! The same problem. import os
from pprint import pprint as pp
from linkedin_scraper import actions, Company
from selenium import webdriver
driver = webdriver.Chrome()
def get_linkedin_campaign_info(linkedin_company_url: str):
linkedin_email = os.environ['LINKEDIN_EMAIL']
linkedin_password = os.environ['LINKEDIN_PASSWORD']
actions.login(driver, linkedin_email, linkedin_password)
return Company(linkedin_company_url, driver=driver)
if __name__ == '__main__':
pp(
get_linkedin_campaign_info("https://ca.linkedin.com/company/google")
)
|
i'm getting the same message |
Hello, I’ve created a pull request (#233) to address this issue. Please take a look and let me know if there’s anything I need to adjust! |
Thanks zigpot, that solves Person(), any insight if this could also be applied to JobSearch? Apologies for the flat text dump, I haven't figured out how to paste code in a pretty way TimeoutException Traceback (most recent call last) File ~/other/jobs/linkedin_scraper/linkedin_scraper/job_search.py:73, in JobSearch.search(self, search_term) File ~/other/jobs/linkedin_scraper/linkedin_scraper/objects.py:82, in Scraper.wait_for_element_to_load(self, by, name, base) File ~/.local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:105, in WebDriverWait.until(self, method, message) TimeoutException: Message: |
@jdtibochab please check the new PR #234 and let me know. |
Thanks! PR-234 fixes Person, but I am still facing the same error above when calling JobSearch. It waits for "jobs-search-results-list" and times out. It might be a different issue, maybe from my side somehow, will look into it. |
my bad, it was job, not job search. will look into it in a jiffy! |
Times out waiting for an element to load (see below). This happens with Person() waiting for "username", and job_search.search() waiting for "jobs-search-results-list". I am not sure why because if I comment on the wait in Person(), everything works fine.
--------------------------------------------------------------------------- TimeoutException Traceback (most recent call last) Cell In[7], line 3 1 from linkedin_scraper import JobSearch 2 job_search = JobSearch(driver=driver, close_on_complete=False, scrape=False) ----> 3 job_listings = job_search.search("Machine Learning Engineer") # returns the list of
Job` from the first pageFile ~/other/jobs/linkedin_scraper/linkedin_scraper/job_search.py:73, in JobSearch.search(self, search_term)
70 sleep(self.WAIT_FOR_ELEMENT_TIMEOUT)
72 job_listing_class_name = "jobs-search-results-list"
---> 73 job_listing = self.wait_for_element_to_load(name=job_listing_class_name)
74 self.wait(10)
76 self.scroll_class_name_element_to_page_percent(job_listing_class_name, 0.3)
File ~/other/jobs/linkedin_scraper/linkedin_scraper/objects.py:82, in Scraper.wait_for_element_to_load(self, by, name, base)
80 def wait_for_element_to_load(self, by=By.CLASS_NAME, name="pv-top-card", base=None):
81 base = base or self.driver
---> 82 return WebDriverWait(base, self.WAIT_FOR_ELEMENT_TIMEOUT).until(
83 EC.presence_of_element_located(
84 (
85 by,
86 name
87 )
88 )
89 )
File ~/.local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py:105, in WebDriverWait.until(self, method, message)
103 break
104 time.sleep(self._poll)
--> 105 raise TimeoutException(message, screen, stacktrace)
TimeoutException: Message:
Stacktrace:
#0 0x571003f45c5a
#1 0x571003c28e2c
#2 0x571003c75661
#3 0x571003c75751
#4 0x571003cb9f64
#5 0x571003c985ed
#6 0x571003cb7303
#7 0x571003c98363
#8 0x571003c68247
#9 0x571003c68b9e
#10 0x571003f0c22b
#11 0x571003f102d1
#12 0x571003ef7ade
#13 0x571003f10e32
#14 0x571003edc77f
#15 0x571003f35618
#16 0x571003f357f0
#17 0x571003f44d8c
#18 0x7f90bb494ac3
`
The text was updated successfully, but these errors were encountered: