Skip to content

Commit

Permalink
enh: init
Browse files Browse the repository at this point in the history
  • Loading branch information
cullenwatson committed Jun 1, 2024
0 parents commit 9ae8c74
Show file tree
Hide file tree
Showing 8 changed files with 2,521 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Python 🐍 distributions 📦 to PyPI
on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install poetry
run: >-
python3 -m
pip install
poetry
--user
- name: Build distribution 📦
run: >-
python3 -m
poetry
build
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/venv/
/.idea
**/__pycache__/
**/.pytest_cache/
/.ipynb_checkpoints/
**/output/
**/.DS_Store
*.pyc
.env
dist
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
language_version: python
args: [--line-length=88, --quiet]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Cullen Watson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
**StaffSpy** is a staff scraper library for LinkedIn companies.

## Features

- Scrapes all staff from a company on **LinkedIn**
- Aggregates the employees in a Pandas DataFrame

### Installation

```
pip install -U staffspy
```

_Python version >= [3.10](https://www.python.org/downloads/release/python-3100/) required_


### Usage

```python
from staffspy import scrape_jobs

staff = scrape_staff(
company="openai"

# optional filters
# search_term="software engineer",
# location="Dallas, TX",
# results_wanted=20,
)
print(f"Found {len(staff)} staff")
print(staff.head())
staff.to_csv("jobs.csv", index=False)
```
A browser will open to sign in to LinkedIn. Press enter after signing in to begin scraping. Ctrl-c to stop scraping.

### Staff Schema

```plaintext
Staff
├── name
├── username
├── about
├── skills
├── location
├── experiences
│ ├── position
│ ├── company
│ ├── location
│ ├── duration
│ ├── from_date
│ └── to_date
├── educations
├── school_name
├── degree
├── location
├── duration
├── from_date
└── to_date
```


## Frequently Asked Questions

---

**Q: Can I get my account banned?**
**A:** It is a possiblity, although it has not happened to me. Use at your own risk.

**Q: Other issues?**
**A:** If problems
persist, [submit an issue](https://github.com/cullenwatson/StaffSpy/issues).
---
Loading

0 comments on commit 9ae8c74

Please sign in to comment.