-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(LinkedIn): Add Get skills from profile URL
- Loading branch information
1 parent
ad7685d
commit 1d695bb
Showing
1 changed file
with
252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "a709360f-3037-4229-b994-104a7a05eaf5", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"<img width=\"10%\" alt=\"Naas\" src=\"https://landen.imgix.net/jtci2pxwjczr/assets/5ice39g4.png?w=160\"/>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "0a4c9657-ed97-489d-a3d9-e1613d077fbd", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"# LinkedIn - Get skills from profile URL" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "2e2b752e-dcd2-4409-b73b-970a52147572", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"**Tags:** #linkedin #scraping #skills #python #webscraping #selenium" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "4f02345d-0784-4c49-a8a6-fdce0ed8367d", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel/)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "f474d830-3e69-4dad-a7d8-0afba447baee", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"**Last update:** 2023-10-31 (Created: 2023-10-31)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "0a73a867-e3d8-48e4-85e6-a216cd2c3273", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"**Description:** This notebook will show how to get skills from a LinkedIn profile URL using web scraping and Selenium. It is usefull for organizations to quickly get a list of skills from a profile." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8b378893-c99f-4933-bbe7-5b9480e55b08", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"**References:**\n- [Selenium Documentation](https://selenium-python.readthedocs.io/)\n- [Web Scraping with Python](https://www.oreilly.com/library/view/web-scraping-with/9781491985571/)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "5be03efe-70bc-4e39-a4f6-e4b05f3e3130", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"## Input" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "d79d8b59-1807-4136-85d9-74d6aae0bd36", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"### Import libraries" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fecb3a4f-4f0b-49af-9bdb-085040b822d3", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": "import selenium\nfrom selenium import webdriver", | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "225decc6-e221-48ef-b19d-5c9e61f3d614", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"### Setup variables\n- `url`: URL of the LinkedIn profile" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fa2e8c2e-6802-43d6-a19e-7d00b498190a", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": "url = \"https://www.linkedin.com/in/florent-ravenel/\"", | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "7385cc76-99b4-43a0-9b82-86d584026921", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"## Model" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ab1530e9-626d-450f-9d86-34245763c944", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"### Get skills from profile" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "acc36175-2bc6-4fb0-8ba1-c36900ce1dbf", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"Long description of the function: This function will use Selenium to open the LinkedIn profile URL and extract the list of skills from the profile." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "4d0bfd33-edf5-4dc6-bd6d-e3c882f5b358", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": "# Open the profile URL\ndriver = webdriver.Chrome()\ndriver.get(url)\n# Get the list of skills\nskills = driver.find_elements_by_class_name(\"pv-skill-category-entity__name-text\")\nskills = [skill.text for skill in skills]", | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "f208996f-1f7a-4d81-bf33-90c639115252", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"## Output" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "7c41b007-4408-4103-a925-af443e207954", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
"### Display result" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ae2667cb-270f-4b3c-9bbd-0c76a8fb31ca", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": "print(skills)", | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "82fb7ece-ad98-489a-9a90-7f074a56b423", | ||
"metadata": { | ||
"papermill": {}, | ||
"tags": [] | ||
}, | ||
"source": [ | ||
" " | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.6" | ||
}, | ||
"widgets": { | ||
"application/vnd.jupyter.widget-state+json": { | ||
"state": {}, | ||
"version_major": 2, | ||
"version_minor": 0 | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |