Skip to content

Commit

Permalink
Add CI, give README some love (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomquirk authored Aug 31, 2024
1 parent 8482d96 commit fcf889e
Show file tree
Hide file tree
Showing 13 changed files with 405 additions and 254 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: LinkedIn API

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv install --dev
- name: Lint
run: |
pipenv run lint
- name: Unit Tests
run: |
pipenv run test_unit
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build:

python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt

sphinx:
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

10 changes: 8 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ lxml = "*"
black = "*"
pytest = "*"
sphinx = "*"
sphinx-rtd-theme = "*"
sphinx-book-theme = "*"
setuptools = "*"
wheel = "*"
twine = "*"
typing-extensions = "*"
tomli = "*"
exceptiongroup = "*"

[scripts]
lint = "black --check ."
test = "python -m pytest tests"
test_unit = "python -m pytest tests/unit"
test_e2e = "python -m pytest tests/e2e"
build = "python setup.py sdist bdist_wheel"
publish = "python -m twine upload dist/*"
publish_test = "python -m twine upload dist/* --repository testpypi"
publish_test = "python -m twine upload dist/* --repository testpypi"
537 changes: 318 additions & 219 deletions Pipfile.lock

Large diffs are not rendered by default.

57 changes: 43 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@

<div align="center">

# LinkedIn API for Python
![Build](https://img.shields.io/github/actions/workflow/status/tomquirk/linkedin-api/ci.yml?label=Build&logo=github) [![GitHub Release](https://img.shields.io/github/v/release/tomquirk/linkedin-api?label=Release&logo=python)](https://pypi.org/project/linkedin-api/) [![License](https://img.shields.io/badge/License-MIT-blue)](#license) [![Documentation](https://img.shields.io/github/v/release/tomquirk/linkedin-api?label=Docs&color=23cc71&logo=readthedocs)](https://linkedin-api.readthedocs.io) [![PyPI Downloads](https://img.shields.io/pypi/dm/linkedin-api?label=Downloads)](https://pypi.org/project/linkedin-api/)


Search profiles, send messages, find jobs and more in Python. No official API access required.

<p align="center">
<a href="https://linkedin-api.readthedocs.io">Documentation</a>
Β·
<a href="#quick-start">Quick Start</a>
Β·
<a href="#how-it-works">How it works</a>
</p>

</div>

<br>

<h3 align="center">Sponsors</h3>

Expand All @@ -23,19 +42,28 @@
</a>
</p>

<h5 align="center"><a href="https://bit.ly/4cCjbIq" target="_blank">Become a sponsor</a></h5>
<p align="center"><a href="https://bit.ly/4cCjbIq" target="_blank">Become a sponsor</a></p>

---
<br>

Programmatically search profiles, send messages, and find jobs. All with a regular LinkedIn user account.
## Features

No "official" API access required - just use a valid LinkedIn account!
- βœ… No official API access required. Just use a valid LinkedIn user account.
- βœ… Direct HTTP API interface. No Selenium, Pupeteer, or other browser-based scraping methods.
- βœ… Get and search people, companies, jobs, posts
- βœ… Send and retrieve messages
- βœ… Send and accept connection requests
- βœ… Get and react to posts

**Caution**: This library is not officially supported by LinkedIn. Using it might violate LinkedIn's Terms of Service. Use it at your own risk.
And more! [Read the docs](https://linkedin-api.readthedocs.io/en/latest/api.html) for all API methods.

## Installation

> Python >= 3.6 required
> [!IMPORTANT]
> This library is not officially supported by LinkedIn. Using this might violate LinkedIn's Terms of Service. Use it at your own risk.
> [!NOTE]
> Python >= 3.8 required
To install the linkedin_api package, use the following command:

Expand All @@ -51,6 +79,7 @@ pip install git+https://github.com/tomquirk/linkedin-api.git

### Quick Start

> [!TIP]
> See all methods on the [documentation website](https://linkedin-api.readthedocs.io/).
The following snippet demonstrates a few basic linkedin_api use cases:
Expand All @@ -71,6 +100,12 @@ contact_info = api.get_profile_contact_info('billy-g')
connections = api.get_profile_connections('1234asc12304')
```

## Documentation

For comprehensive documentation, including available methods and parameters, visit the [documentation](https://linkedin-api.readthedocs.io/).

[Learn more](#how-it-works) about how it works.

## Commercial alternatives

> This is a sponsored section
Expand Down Expand Up @@ -158,8 +193,7 @@ Scrape Any Data from LinkedIn, without limit with [ScrapIn API](https://bit.ly/4
- Interactive API documentation
- A highly stable API, backed by over 4 years of experience in data provisioning, with the added reliability of two additional data provider brands owned by the company behind ScrapIn.

Try it for free. [Get your API key now](https://bit.ly/4fUyE9J)

Try it for free. [Get your API key now](https://bit.ly/4fUyE9J)

</details>

Expand All @@ -185,16 +219,11 @@ Access high-quality, real-time LinkedIn data at scale with [iScraper API](https:
- Lowest price guarantee for high volume use

Get started [here](https://bit.ly/3AFPGZd).

</details>

> End sponsored section
## Documentation

For comprehensive documentation, including available methods and parameters, visit the [documentation](https://linkedin-api.readthedocs.io/).

[Learn more](#how-it-works) about how it works.

## Disclaimer

This library is not endorsed or supported by LinkedIn. It is an unofficial library intended for educational purposes and personal use only. By using this library, you agree to not hold the author or contributors responsible for any consequences resulting from its usage.
Expand Down
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion linkedin_api/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,6 @@ def get_job(self, job_id: str) -> Dict:
return {}

return data


def get_post_reactions(self, urn_id, max_results=None, results=None):
"""Fetch social reactions for a given LinkedIn post.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
sphinx-book-theme==2.0.0
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fcf889e

Please sign in to comment.