linkedin_scraper
linkedin_scraper copied to clipboard
timeoutexception
`---------------------------------------------------------------------------
TimeoutException Traceback (most recent call last)
/var/folders/yg/gs2ks95x7nv5jf8jw2kclg0h0000gn/T/ipykernel_8893/3555641424.py in
~/.local/lib/python3.9/site-packages/linkedin_scraper/person.py in init(self, linkedin_url, name, about, experiences, educations, interests, accomplishments, company, job_title, contacts, driver, get, scrape, close_on_complete, time_to_wait_after_login) 62 63 if scrape: ---> 64 self.scrape(close_on_complete) 65 66 def add_about(self, about):
~/.local/lib/python3.9/site-packages/linkedin_scraper/person.py in scrape(self, close_on_complete) 87 def scrape(self, close_on_complete=True): 88 if self.is_signed_in(): ---> 89 self.scrape_logged_in(close_on_complete=close_on_complete) 90 else: 91 print("you are not logged in!")
~/.local/lib/python3.9/site-packages/linkedin_scraper/person.py in scrape_logged_in(self, close_on_complete) 257 duration = None 258 --> 259 root = WebDriverWait(driver, self.__WAIT_FOR_ELEMENT_TIMEOUT).until( 260 EC.presence_of_element_located( 261 (
~/.local/lib/python3.9/site-packages/selenium/webdriver/support/wait.py in until(self, method, message) 103 if time.monotonic() > end_time: 104 break --> 105 raise TimeoutException(message, screen, stacktrace) 106 107 def until_not(self, method: Callable[[D], T], message: str = "") -> Union[T, Literal[True]]:
TimeoutException: Message: Stacktrace: 0 chromedriver 0x000000010740d168 chromedriver + 4673896 1 chromedriver 0x00000001074049c3 chromedriver + 4639171 2 chromedriver 0x0000000106ff8fdd chromedriver + 397277 3 chromedriver 0x0000000107044bfc chromedriver + 707580 4 chromedriver 0x0000000107044dd1 chromedriver + 708049 5 chromedriver 0x0000000107089284 chromedriver + 987780 6 chromedriver 0x00000001070678ed chromedriver + 850157 7 chromedriver 0x0000000107086796 chromedriver + 976790 8 chromedriver 0x0000000107067663 chromedriver + 849507 9 chromedriver 0x00000001070371cf chromedriver + 651727 10 chromedriver 0x00000001070381ae chromedriver + 655790 11 chromedriver 0x00000001073cd380 chromedriver + 4412288 12 chromedriver 0x00000001073d2798 chromedriver + 4433816 13 chromedriver 0x00000001073b1d71 chromedriver + 4300145 14 chromedriver 0x00000001073d34e6 chromedriver + 4437222 15 chromedriver 0x00000001073a3d3c chromedriver + 4242748 16 chromedriver 0x00000001073f3208 chromedriver + 4567560 17 chromedriver 0x00000001073f33be chromedriver + 4567998 18 chromedriver 0x0000000107404603 chromedriver + 4638211 19 libsystem_pthread.dylib 0x00007ff8043f5259 _pthread_start + 125 20 libsystem_pthread.dylib 0x00007ff8043f0c7b thread_start + 15`
I get this error after successfully logged in and opened the person's page when trying to run person = Person("https://www.linkedin.com/in/rubeela-farooqi-464a977", driver=driver)
I have the error than you, is there a solution ?
nope
same error here I dont get it
Same error
same here
Has anybody found a solution and/or an alternative to linkedin_scraper?
same here
I have the same issue. Are you guys also on M1+ Macs?
I can only login when not running in headless, but upon person.scrape() I get the above issue.
None of my debugging attempts worked, eg:
# 5. Custom wait and scrape function
def custom_scrape(linkedin_url):
driver.get(linkedin_url)
# Wait for a common element that should be present on all profiles
WebDriverWait(driver, 20).until(
EC.presence_of_element_located((By.CLASS_NAME, "pv-top-card"))
)
person = Person(linkedin_url, driver=driver, scrape=False)
person.scrape()
return person
# 6. Use the custom scrape function
profile_url = "https://www.linkedin.com/in/andre-iguodala-65b48ab5"
person = custom_scrape(profile_url)
if person:
print(f"Name: {person.name}")
print(f"About: {person.about}")
print(f"Experiences: {person.experiences}")
# ... print other attributes as needed
Any guidance @joeyism ?