Skip to content
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 #210

Open
ZeroDelayPayday opened this issue Feb 5, 2024 · 9 comments
Open

timeoutexception #210

ZeroDelayPayday opened this issue Feb 5, 2024 · 9 comments

Comments

@ZeroDelayPayday
Copy link

`---------------------------------------------------------------------------
TimeoutException Traceback (most recent call last)
/var/folders/yg/gs2ks95x7nv5jf8jw2kclg0h0000gn/T/ipykernel_8893/3555641424.py in
----> 1 person = Person("https://www.linkedin.com/in/rubeela-farooqi-464a977", driver=driver)

~/.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)

@RambokDev
Copy link

I have the error than you, is there a solution ?

@mattsegura
Copy link

nope

@75andybermond
Copy link

same error here I dont get it

@deatinor
Copy link

Same error

@gabriellhuver
Copy link

same here

@ymyke
Copy link

ymyke commented May 11, 2024

Has anybody found a solution and/or an alternative to linkedin_scraper?

@BenedictBode
Copy link

same here

@jakubLangr
Copy link

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 ?

@deepak-aiseberg
Copy link

deepak-aiseberg commented Oct 20, 2024

I too got the same issue on my Mac M3.
While the application was running before TimeoutError, I noticed the the application opening up a chrome window, where all the automation of filling in the username and password(which we have provided) was going on.
After that, linkedin now uses a notification system on your mobile to verify user login. I accepted and gave permission for the same.
After that, It was able to see linkedin data and Hence, this TimeoutError went away.
Also, after you verify your login, It works forever afterwards.
PS: Headless option was disabled while i tested this

Hopefully this would solve your problems.

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

No branches or pull requests

10 participants