Skip to content

Commit

Permalink
fix(py): increase timout
Browse files Browse the repository at this point in the history
  • Loading branch information
l4rm4nd authored Jul 30, 2024
1 parent e3e101d commit 11a07f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkedindumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ def show_loading_message(stop_event):
def get_company_id(company):
company_encoded = urllib.parse.quote(company)
api1 = f"https://www.linkedin.com/voyager/api/voyagerOrganizationDashCompanies?decorationId=com.linkedin.voyager.dash.deco.organization.MiniCompany-10&q=universalName&universalName={company_encoded}"
r = requests.get(api1, headers=headers, cookies=cookies_dict, timeout=10)
r = requests.get(api1, headers=headers, cookies=cookies_dict, timeout=200)
response1 = r.json()
company_id = response1["elements"][0]["entityUrn"].split(":")[-1]
return company_id

def get_employee_data(company_id, start, count=10):
api2 = f"https://www.linkedin.com/voyager/api/search/dash/clusters?decorationId=com.linkedin.voyager.dash.deco.search.SearchClusterCollection-165&origin=COMPANY_PAGE_CANNED_SEARCH&q=all&query=(flagshipSearchIntent:SEARCH_SRP,queryParameters:(currentCompany:List({company_id}),resultType:List(PEOPLE)),includeFiltersInResponse:false)&count={count}&start={start}"
r = requests.get(api2, headers=headers, cookies=cookies_dict, timeout=10)
r = requests.get(api2, headers=headers, cookies=cookies_dict, timeout=200)
response2 = r.json()
return response2

Expand Down

0 comments on commit 11a07f7

Please sign in to comment.