Skip to content

Commit c70a04a

Browse files
committed
enh: init
0 parents  commit c70a04a

9 files changed

+2502
-0
lines changed

.github/workflows/publish-to-pypi.yml

Whitespace-only changes.

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/venv/
2+
/.idea
3+
**/__pycache__/
4+
**/.pytest_cache/
5+
/.ipynb_checkpoints/
6+
**/output/
7+
**/.DS_Store
8+
*.pyc
9+
.env
10+
dist

.pre-commit-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 24.2.0
4+
hooks:
5+
- id: black
6+
language_version: python
7+
args: [--line-length=88, --quiet]

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Cullen Watson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
**StaffSpy** is a LinkediIn staff scraping library.
2+
3+
## Features
4+
5+
- Scrapes all staff from a company on **LinkedIn** using given criteria
6+
- Aggregates the employees in a Pandas DataFrame
7+
8+
### Installation
9+
10+
```
11+
pip install -U staffspy
12+
```
13+
14+
_Python version >= [3.10](https://www.python.org/downloads/release/python-3100/) required_
15+
16+
17+
### Usage
18+
19+
```python
20+
from staffspy import scrape_jobs
21+
22+
staff = scrape_staff(
23+
company="openai"
24+
25+
# opional filters
26+
# search_term="software engineer",
27+
# location="Dallas, TX",
28+
# results_wanted=20,
29+
)
30+
print(f"Found {len(staff)} staff")
31+
print(staff.head())
32+
staff.to_csv("jobs.csv", index=False)
33+
```
34+
A browser will open to sign in to LinkedIn. Press enter after signing in to begin scraping. Ctrl-c to stop scraping.
35+
36+
### Staff Schema
37+
38+
```plaintext
39+
Staff
40+
├── name
41+
├── username
42+
├── about
43+
├── skills
44+
├── location
45+
├── experiences
46+
│ ├── position
47+
│ ├── company
48+
│ ├── location
49+
│ ├── duration
50+
│ ├── from_date
51+
│ └── to_date
52+
├── educations
53+
├── school_name
54+
├── degree
55+
├── location
56+
├── duration
57+
├── from_date
58+
└── to_date
59+
```
60+
61+
62+
## Frequently Asked Questions
63+
64+
---
65+
66+
**Q: Can I get my account banned?**
67+
**A:** It is a possiblity, although it has not happened to me. Use at your own risk.
68+
69+
**Q: Too many staff at a company?**
70+
**A:** Try using the filters to find the type of staff you are looking for. If problems
71+
persist, [submit an issue](https://github.com/cullenwatson/StaffSpy/issues).
72+
---

main.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This is a sample Python script.
2+
3+
# Press ⌃R to execute it or replace it with your code.
4+
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.
5+
6+
7+
def print_hi(name):
8+
# Use a breakpoint in the code line below to debug your script.
9+
print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
10+
11+
12+
# Press the green button in the gutter to run the script.
13+
if __name__ == '__main__':
14+
print_hi('PyCharm')
15+
16+
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

0 commit comments

Comments
 (0)