Skip to content

Commit 5c38773

Browse files
committed
enh: init
0 parents  commit 5c38773

8 files changed

+2521
-0
lines changed

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

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
on: push
3+
4+
jobs:
5+
build-n-publish:
6+
name: Build and publish Python 🐍 distributions 📦 to PyPI
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: "3.10"
15+
16+
- name: Install poetry
17+
run: >-
18+
python3 -m
19+
pip install
20+
poetry
21+
--user
22+
23+
- name: Build distribution 📦
24+
run: >-
25+
python3 -m
26+
poetry
27+
build
28+
29+
- name: Publish distribution 📦 to PyPI
30+
if: startsWith(github.ref, 'refs/tags')
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
password: ${{ secrets.PYPI_API_TOKEN }}

.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**
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+
# optional 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: Other issues?**
70+
**A:** If problems
71+
persist, [submit an issue](https://github.com/cullenwatson/StaffSpy/issues).
72+
---

0 commit comments

Comments
 (0)