Git Product home page Git Product logo

linkedinsraper_prospector's Introduction

LinkedIn Scraper

Purpose

Automates the process of getting scraping Linkedin profile contents for creating an object field and profile template containing this information.

Scapers

Use Selenium Chrome webdriver for browsing through the webpages(Linkedin) and BeatifulSoup(bs4 library) to save html DOM of loaded profile pages. Object attributes selected and scraped using imported library functions

Linkedinscraper.py or scraper_general.py

Hard-coded "Author Profiles" csv file, which is in the column format [name , URL] where each URL link is scraped. Each scraped object is added to the JSON list of profiles in profiles.json. Other lists include authors.json, companies.json, authors_education.json , which store this info for each author.

Usage

python scrape_general.py

Scrape profile from CSV input of profiles

Same as general scraper, but takes in the author profiles csv file as a command line argument. This avoids hardcoding solutions.

Usage

// format: scrape_profiles.py {csv filename}
python scrape_profiles.py test_profiles.csv

Profile Template

template.html

This is a raw HTML template which searches through the profiles script dt variable (dt is the list of JSON profiles in profiles.js) and given the name to look for in search.js, populates the template with the author profile object attributes

Default profile card

Create Templates for all profiles and save Raw HTML

To automate the process of generating each profile card with template.html . generate_profiles.py generates a JSON list of the HTML profile card's for each of the authors in raw text.


python generate_profiles.py 
  • generate_profile.py * takes in a command line argument, which is the author name to search for

// format: generate_profile.py {author name}
python generate_profile.py "author name"

The profile card raw HTML text mapped to each author name are then stored in the file profile_map.json

linkedinsraper_prospector's People

Contributors

mkhanyisig avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.