Skip to main content

html2info

html2info is a Python package that allows you to parse LinkedIn profiles from raw HTML and return structured information in JSON format.

Features

  • Extracts profile information such as name, title, location, profile photo, about, experience, and education.
  • Returns a JSON object containing the parsed data.

Installation

Install html2info using pip:

pip install html2info

Usage

Here's an example of how to use html2info:

LinkedIn

from html2info.linkedin import Person

url = "https://www.linkedin.com/in/iglovikov"
raw_data = "..."  # Raw HTML content of the LinkedIn page

person = Person(url, raw_data)
person.parse()
print(person.to_dict())
{
    "linkedin_url": "https://www.linkedin.com/in/iglovikov",
    "name": "Vladimir Iglovikov",
    "title": "Kaggle Grandmaster. Co-creator of Albumentations.AI",
    "location": "San Francisco, California, United States",
    "profile_photo_link": "https://media.licdn.com/dms/image/C4D03AQFDvheHDkAQlw/profile-displayphoto-shrink_400_400/0/1654539436934?e=1687392000&v=beta&t=OX7WrIprduo-xWEvrRKNzYdqcqG6bdzDtlm6LWuHbIE",
    "about": "• Advisor and Angel investor.\n• Co-creator, Albumentations.AI: Open-source library with 30k daily downloads, adopted by top Computer Vision companies & Kaggle competition winners\n• Former Staff ML Engineer, Lyft Level5 (Autonomous Vehicles): Led Deep Learning model development & integration for Self-Driving & Ride Sharing\n• Kaggle Grandmaster: Multiple ML competition wins\n• Author: 20+ publications in Deep Learning for Medical, Satellite, Street View, and Natural Images",
    "experience": [
      {
        "title": "Chief Executive Officer",
        "company": "Ternaus Inc · Full-time",
        "image_link": null,
        "company_link": "https://www.linkedin.com/search/results/all/?keywords=Ternaus+Inc",
        "dates": "Aug 2022 - Present · 9 mos",
        "description": null
      },
      {
        "title": "Evangelist",
        "company": "OpenDataScience",
        "image_link": "https://media.licdn.com/dms/image/C510BAQFU1fTt5tE6Ug/company-logo_100_100/0/1554042536921?e=1689811200&v=beta&t=-sIbC_T8hZjxf5TNgO_H0ClRcYb7Y_oow6dAdW8xMHg",
        "company_link": "https://www.linkedin.com/company/11241268/",
        "dates": "Aug 2016 - Mar 2022 · 5 yrs 8 mos",
        "description": "OpenDataScience, or ODS, is a Russian-speaking community of over 50,000 data scientists, researchers, and engineers. ODS freely disseminates knowledge, and promotes professional development and exchange of ideas and opportunities in all areas of Data Science through live events, online classes and discussions, and other resources. Join us at http://ods.ai."
      },
      {
        "title": "Staff ML Engineer",
        "company": "Lyft · Full-time",
        "image_link": "https://media.licdn.com/dms/image/C560BAQFoMDej0VdZVA/company-logo_100_100/0/1545416046198?e=1689811200&v=beta&t=JV79uOIdgcbYcAeg0YAklLLZ6c5VkldGSG-Zu3G42xI",
        "company_link": "https://www.linkedin.com/company/2620735/",
        "dates": "Oct 2017 - Aug 2021 · 3 yrs 11 mos",
        "description": null
      },
      {
        "title": "Advisor",
        "company": "Iterative.ai · Part-time",
        "image_link": "https://media.licdn.com/dms/image/C4E0BAQGnnEVzx81kBg/company-logo_100_100/0/1653056165184?e=1689811200&v=beta&t=dNl2Q2CDgmX2r3KiymYIqjPtXJQXIYeTzgdNduZLLTs",
        "company_link": "https://www.linkedin.com/company/18657719/",
        "dates": "Nov 2018 - Nov 2020 · 2 yrs 1 mo",
        "description": null
      },
      {
        "title": "Senior Data Scientist (Machine Learning)",
        "company": "TrueAccord",
        "image_link": "https://media.licdn.com/dms/image/C560BAQEo_A523IxkGQ/company-logo_100_100/0/1656418732741?e=1689811200&v=beta&t=YRjhRCxnfijmSz40qvRCeKxkfoMHYGU1oiPGIJht-aw",
        "company_link": "https://www.linkedin.com/company/3249455/",
        "dates": "Jun 2016 - Sep 2017 · 1 yr 4 mos",
        "description": "Developed a supervised machine learning algorithm that predicts what personalized emails should be sent to each user to drive him to the target website. ROC AUC score 0.88. Prototyped, implemented, deployed and tested machine learning algorithm that helped to prioritize outbound phone traffic, improving conversion through phone calls by 80%."
      }
    ],
    "education_list": [
      {
        "university_name": "University of California, Davis",
        "degree_and_major": "Doctor of Philosophy (Ph.D.), Physics",
        "dates": "2010 - 2015",
        "university_link": "https://www.linkedin.com/company/2842/",
        "image_link": "https://media.licdn.com/dms/image/C4E0BAQEBG25KNBwuCQ/company-logo_100_100/0/1616103040374?e=1689811200&v=beta&t=sUF5ars4S8ek3vZs01usUvGwSJsU01KYtANnMkkZFdQ"
      },
      {
        "university_name": "Saint Petersburg State University",
        "degree_and_major": "Master's degree, Physics",
        "dates": "2001 - 2010",
        "university_link": "https://www.linkedin.com/company/15099991/",
        "image_link": "https://media.licdn.com/dms/image/C560BAQHWUjwogE235A/company-logo_100_100/0/1519863922741?e=1689811200&v=beta&t=DSpsTKY_AcMrmzWY1592EvCClph4M_TVOLdNSDpOg2I"
      }
    ]
  }

Kaggle

from html2info.kaggle import Person

url = "https://www.kaggle.com/iglovikov"
raw_data = "..."  # Raw HTML content of the LinkedIn page

person = Person(url, raw_data)
person.parse()
print(person.to_dict())
{
    "url": "https://www.kaggle.com/iglovikov",
    "name": "Vladimir Iglovikov",
    "title": "CEO  at ternaus.com",
    "location": "San Francisco, California, United States",
    "profile_photo_link": "https://storage.googleapis.com/kaggle-avatars/images/286455-fb.jpg",
    "social_network_links": [
      "https://github.com/ternaus",
      "https://twitter.com/viglovikov",
      "https://www.linkedin.com/in/iglovikov",
      "https://salesbrain.tech/"
    ],
    "personal_website_link": "https://salesbrain.tech/",
    "num_followers": 1534,
    "competitions_summary": {
      "tier": "grandmaster",
      "tier_image": "/static/images/tiers/grandmaster@48.png",
      "medals": {
        "gold": 5,
        "silver": 9,
        "bronze": 8
      },
      "highest_rank": 19
    },
    "datasets_summary": {
      "tier": "contributor",
      "tier_image": "/static/images/tiers/contributor@48.png",
      "medals": {
        "gold": 0,
        "silver": 0,
        "bronze": 0
      },
      "highest_rank": -1
    },
    "notebooks_summary": {
      "tier": "contributor",
      "tier_image": "/static/images/tiers/contributor@48.png",
      "medals": {
        "gold": 1,
        "silver": 1,
        "bronze": 1
      },
      "highest_rank": -1
    },
    "discussion_summary": {
      "tier": "master",
      "tier_image": "/static/images/tiers/master@48.png",
      "medals": {
        "gold": 52,
        "silver": 26,
        "bronze": 177
      },
      "highest_rank": 6
    },
    "bio": "* CEO at Ternaus Inc\n* Staff Computer Vision Engineer at Level5 Engineering Center, Lyft Inc (2017-2021)\n* Senior Data Scientist at TrueAccord (2016-2017)\n* Data Scientist at Bidgely (2015-2016)\n* PhD in theoretical Condensed Matter Physics at University of California, Davis (2010-2015)\n* MS in theoretical High Energy Physics at Saint Petersburg State University (2001-2010)\n* Спецназ ВДВ . Медаль за воинскую доблесть за вторую Чеченскую. (2002-2004)\n"
  }

Metadata

Release files for html2info 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for html2info 0.2.0
File Size Uploaded
html2info-0.2.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for html2info 0.2.0
File Interpreter ABI Platform
html2info-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / html2info-0.2.0.tar.gz

Download URL html2info-0.2.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
49c8200eabde604577592ef3528629bcb3f368d48de8bfe0a4dddaf72730e9f4
BLAKE2b-256 checksum
How to use checksums
c41848a94e598852fd1c027913a01919a0f7147828b2fa705d177acb4261dc3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / html2info-0.2.0-py3-none-any.whl

Download URL html2info-0.2.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13797a34bafb2d761db130bc086604f3842da7b7ab93ea4aab6d1832a34723dd
BLAKE2b-256 checksum
How to use checksums
4a3b3a85f6bb142a04ee9d0f9c7aa86e1e0c401900b5d683cd8b4080447f579a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page