Skip to content

Commit f3c7f9c

Browse files
committed
Updated version and markdown
1 parent 2b6f995 commit f3c7f9c

File tree

2 files changed

+80
-8
lines changed

2 files changed

+80
-8
lines changed

README.md

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
Scrapes Linkedin User Data
44

5+
[Linkedin Scraper](#linkedin-scraper)
6+
* [Installation](#installation)
7+
* [Setup](#setup)
8+
* [Usage](#usage)
9+
+ [Sample Usage](#sample-usage)
10+
+ [User Scraping](#user-scraping)
11+
+ [Company Scraping](#company-scraping)
12+
+ [Job Scraping](#job-scraping)
13+
+ [Job Search Scraping](#job-search-scraping)
14+
+ [Scraping sites where login is required first](#scraping-sites-where-login-is-required-first)
15+
+ [Scraping sites and login automatically](#scraping-sites-and-login-automatically)
16+
* [API](#api)
17+
+ [Person](#person)
18+
- [`linkedin_url`](#linkedin_url)
19+
- [`name`](#name)
20+
- [`about`](#about)
21+
- [`experiences`](#experiences)
22+
- [`educations`](#educations)
23+
- [`interests`](#interests)
24+
- [`accomplishment`](#accomplishment)
25+
- [`company`](#company)
26+
- [`job_title`](#job_title)
27+
- [`driver`](#driver)
28+
- [`scrape`](#scrape)
29+
- [`scrape(close_on_complete=True)`](#scrapeclose_on_completetrue)
30+
+ [Company](#company)
31+
- [`linkedin_url`](#linkedin_url-1)
32+
- [`name`](#name-1)
33+
- [`about_us`](#about_us)
34+
- [`website`](#website)
35+
- [`headquarters`](#headquarters)
36+
- [`founded`](#founded)
37+
- [`company_type`](#company_type)
38+
- [`company_size`](#company_size)
39+
- [`specialties`](#specialties)
40+
- [`showcase_pages`](#showcase_pages)
41+
- [`affiliated_companies`](#affiliated_companies)
42+
- [`driver`](#driver-1)
43+
- [`get_employees`](#get_employees)
44+
- [`scrape(close_on_complete=True)`](#scrapeclose_on_completetrue-1)
45+
* [Contribution](#contribution)
46+
547
## Installation
648

749
```bash
@@ -29,25 +71,55 @@ driver = webdriver.Chrome()
2971
email = "some-email@email.address"
3072
password = "password123"
3173
actions.login(driver, email, password) # if email and password isnt given, it'll prompt in terminal
32-
person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver=driver)
74+
person = Person("https://www.linkedin.com/in/joey-sham-aa2a50122", driver=driver)
3375
```
3476

3577
**NOTE**: The account used to log-in should have it's language set English to make sure everything works as expected.
3678

3779
### User Scraping
38-
3980
```python
4081
from linkedin_scraper import Person
4182
person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5")
4283
```
4384

4485
### Company Scraping
45-
4686
```python
4787
from linkedin_scraper import Company
4888
company = Company("https://ca.linkedin.com/company/google")
4989
```
5090

91+
### Job Scraping
92+
```python
93+
from linkedin_scraper import JobSearch, actions
94+
from selenium import webdriver
95+
96+
driver = webdriver.Chrome()
97+
email = "some-email@email.address"
98+
password = "password123"
99+
actions.login(driver, email, password) # if email and password isnt given, it'll prompt in terminal
100+
input("Press Enter")
101+
job = Job("https://www.linkedin.com/jobs/collections/recommended/?currentJobId=3456898261", driver=driver, close_on_complete=False)
102+
```
103+
104+
### Job Search Scraping
105+
```python
106+
from linkedin_scraper import JobSearch, actions
107+
from selenium import webdriver
108+
109+
driver = webdriver.Chrome()
110+
email = "some-email@email.address"
111+
password = "password123"
112+
actions.login(driver, email, password) # if email and password isnt given, it'll prompt in terminal
113+
input("Press Enter")
114+
job_search = JobSearch(driver=driver, close_on_complete=False, scrape=False)
115+
# job_search contains jobs from your logged in front page:
116+
# - job_search.recommended_jobs
117+
# - job_search.still_hiring
118+
# - job_search.more_jobs
119+
120+
job_listings = job_search.search("Machine Learning Engineer") # returns the list of `Job` from the first page
121+
```
122+
51123
### Scraping sites where login is required first
52124
1. Run `ipython` or `python`
53125
2. In `ipython`/`python`, run the following code (you can modify it if you need to specify your driver)
@@ -117,10 +189,10 @@ This is the interests they have. A list of `linkedin_scraper.scraper.Interest`
117189
#### `accomplishment`
118190
This is the accomplishments they have. A list of `linkedin_scraper.scraper.Accomplishment`
119191

120-
### `company`
192+
#### `company`
121193
This the most recent company or institution they have worked at.
122194

123-
### `job_title`
195+
#### `job_title`
124196
This the most recent job title they have.
125197

126198
#### `driver`
@@ -136,7 +208,7 @@ person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver =
136208
When this is **True**, the scraping happens automatically. To scrape afterwards, that can be run by the `scrape()` function from the `Person` object.
137209

138210

139-
### `scrape(close_on_complete=True)`
211+
#### `scrape(close_on_complete=True)`
140212
This is the meat of the code, where execution of this function scrapes the profile. If *close_on_complete* is True (which it is by default), then the browser will close upon completion. If scraping of other profiles are desired, then you might want to set that to false so you can keep using the same driver.
141213

142214

@@ -194,7 +266,7 @@ company = Company("https://ca.linkedin.com/company/google", driver=driver)
194266
```
195267

196268

197-
### `scrape(close_on_complete=True)`
269+
#### `scrape(close_on_complete=True)`
198270
This is the meat of the code, where execution of this function scrapes the company. If *close_on_complete* is True (which it is by default), then the browser will close upon completion. If scraping of other companies are desired, then you might want to set that to false so you can keep using the same driver.
199271

200272
## Contribution

linkedin_scraper/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .jobs import Job
66
from .job_search import JobSearch
77

8-
__version__ = "2.9.2"
8+
__version__ = "2.10.0"
99

1010
import glob
1111
modules = glob.glob(dirname(__file__)+"/*.py")

0 commit comments

Comments
 (0)