Skip to content

Commit

Permalink
fix: split text not working with school to enrich org
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Apr 22, 2024
1 parent 1c8ed88 commit 8e9ef3e
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,16 @@
" if \"company\" in linkedin_url and organization_id == \"TBD\" and call_linkedin < limit_linkedin and (interaction_score >= 3 or call_linkedin < limit_linkedin):\n",
" print()\n",
" print(f\"{count} - 🕸️ LinkedIn - Enrich data for '{organization}': {int(interaction_score)} ({linkedin_url})\")\n",
" linkedin_dir = os.path.join(datalake_dir, \"datalake\", \"linkedin\", \"organizations\") \n",
" linkedin_id = linkedin_url.split(\"/company/\")[1].split(\"/\")[0]\n",
" tmp_df = pload(linkedin_dir, f\"{linkedin_id}_linkedin_company_info\")\n",
" linkedin_dir = os.path.join(datalake_dir, \"datalake\", \"linkedin\", \"organizations\")\n",
" split_text = \"\"\n",
" if \"company\" in linkedin_url:\n",
" split_text = \"company\"\n",
" if \"showcase\" in linkedin_url:\n",
" split_text = \"showcase\"\n",
" if \"school\" in linkedin_url:\n",
" split_text = \"school\"\n",
" linkedin_id = linkedin_url.split(f\"/{split_text}/\")[1].split(\"/\")[0]\n",
" tmp_df = pload(linkedin_dir, f\"{linkedin_id}_linkedin_{split_text}_info\")\n",
" if tmp_df is None:\n",
" try:\n",
" tmp_df = linkedin.connect(li_at, JSESSIONID).company.get_info(linkedin_url)\n",
Expand Down

0 comments on commit 8e9ef3e

Please sign in to comment.