This package is using Selenium Finder
library as engine for scrape datas from LinkedIn webpage(Pre Login)
Clone this repo to your current directory
git clone https://github.com/galihanggara68/linkedin-scraper.git
or install using pip
pip3 install git+https://github.com/galihanggara68/linkedin-scraper.git@master
First of all import LinkedIn class
from LinkedIn_Scraper.linkedin import LinkedInScraper
LinkedIn
class has 3 parameters driver
the Selenium WebDriver, finder
a Finder object, and cookie_path
a path of cookie json for login to LinkedIn
from selenium import webdriver
driver = webdriver.Chrome()
# global_wait default 10 second
# iterable_each_wait default 1 second
options = {"global_wait": 10, "iterable_each_wait": 2}
finder = Finder(driver, options)
# create LinkedInScraper instance
ld = LinkedInScraper(driver, finder, "www.linkedin.com.cookies.json")
# start scraping
ld.exec_scraper("Galih Anggara")
# get the result
print(ld.get_data())
execute scraper with username
parameter(the username to search for)
get scraped result