Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
l4rm4nd authored Mar 13, 2023
1 parent b12bc3f commit 6b61101
Showing 1 changed file with 41 additions and 21 deletions.
62 changes: 41 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
# XingDumper
Python 3 script to dump company employees from XING API.
<div align="center" width="100%">
<h1>XingDumper</h1>
<p>Python 3 script to dump company employees from XING API</p><p>
<a target="_blank" href="https://github.com/l4rm4nd"><img src="https://img.shields.io/badge/maintainer-LRVT-orange" /></a>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/graphs/contributors/"><img src="https://img.shields.io/github/contributors/l4rm4nd/XingDumper.svg" /></a><br>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/commits/"><img src="https://img.shields.io/github/last-commit/l4rm4nd/XingDumper.svg" /></a>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/issues/"><img src="https://img.shields.io/github/issues/l4rm4nd/XingDumper.svg" /></a>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed/l4rm4nd/XingDumper.svg" /></a><br>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/stargazers"><img src="https://img.shields.io/github/stars/l4rm4nd/XingDumper.svg?style=social&label=Star" /></a>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/network/members"><img src="https://img.shields.io/github/forks/l4rm4nd/XingDumper.svg?style=social&label=Fork" /></a>
<a target="_blank" href="https://github.com/l4rm4nd/XingDumper/watchers"><img src="https://img.shields.io/github/watchers/l4rm4nd/XingDumper.svg?style=social&label=Watch" /></a><br>
<a target="_blank" href="https://hub.docker.com/repository/docker/l4rm4nd/xingdumper/general"><img src="https://badgen.net/badge/icon/l4rm4nd%2Fxingdumper:latest?icon=docker&label" /></a><br><p>
<a href="https://www.buymeacoffee.com/LRVT" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
</div>

The results contain firstname, lastname, position, gender, location and a user's profile link. Only 2 API calls are required to retrieve all employees.
## 💬 Description

With the `--full` CLI flag an additional API request will be made for each employee to retrieve contact details such as email, fax, mobile and phone number. However, this data is most often unset by XING users. With the `--email-format` CLI flag one can define a Python string format to auto generate email addresses based on the retrieved first and last name.
XingDumper is a Python 3 script that dumps employee data from the XING social networking platform.

The results contain firstname, lastname, position, gender, location and a user's profile link. Only 2 API calls are required to retrieve all employees.

## ✨ Requirements

XingDumper talks with the unofficial XING API, which requires authentication. Therefore, you must have a valid XING user account. To keep it simple, XingDumper just excepts a cookie value provided by you. Doing it this way, even 2FA protected accounts are supported. Furthermore, you are tasked to provide a XING company URL to dump employees from.

#### Retrieving XING Cookie

## How-To
1. Sign into www.xing.com and retrieve your ``login`` cookie value e.g. via developer tools
2. Specify your cookie value in the python script's variable ``LOGIN_COOKIE`` or via the CLI flag ``--cookie``
3. Browse your company on XING and note the url. Must be something like https://www.xing.com/pages/appleretaildeutschlandgmbh
4. Install requirements via ``pip install -r requirements.txt``
5. Run the Python script and enjoy results
2. Specify your cookie value either in the python script's variable ``LOGIN_COOKIE`` or during runtime via the CLI flag ``--cookie``

#### Retrieving XING Company URL

1. Search your target company on Google Search or directly on XING
2. The Xing company URL should look something like this: https://www.xing.com/pages/appleretaildeutschlandgmbh

## 🎓 Usage

## Usage
````
usage: xingdumper.py [-h] --url <xing-url> [--count <number>] [--cookie <cookie>] [--full] [--quiet] [--email-format EMAIL_FORMAT]
Expand All @@ -32,24 +54,22 @@ options:
[6] jd@example.com > '{0[0]}{1[0]}@example.com'
````

## Docker Run Examples
````
docker run --rm l4rm4nd/xingdumper:latest --url <xing-url> --cookie <cookie> --email-format '{0}.{1}@example.com'
````
> **Note**:
> Dumped contact details via `--full` are most often empty. Germans seem to take privacy seriously! Furthermore, the details may only be accessible if you already belong to the contact list of the crawled employee. Kinda unlikely, however the default privacy settings of XING would allow a retrival, if the data is configured and the privacy settings not changed by the user.
## Examples
### 🐳 Example 1 - Docker Run

Dumping all Audi employees from XING API (max. 3000) into outfile using `--quiet` mode:
````
python3 xingdumper.py --url 'https://www.xing.com/pages/audiag' --quiet > audi_employees.out
docker run --rm l4rm4nd/xingdumper:latest --url https://www.xing.com/pages/audiag --cookie <cookie> --email-format '{0}.{1}@apple.de'
````
Dumping 10 Apple employees from XING API with additional contact details as terminal output and auto generate email with provided string format::

### 🐍 Example 2 - Native Python

````
python3 xingdumper.py --url 'https://www.xing.com/pages/appleretaildeutschlandgmbh' --count 10 --full --email-format '{0}.{1}@apple.de'
python3 xingdumper.py --url https://www.xing.com/pages/audiag --cookie <cookie> --email-format '{0}.{1}@apple.de
````
**Note**: Contact details are most often empty. We Germans take privacy seriously! Further, the details may only be accessible if you already belong to the contact list of the crawled employee. Kinda unlikely, however the default privacy settings of XING would allow a retrival, if the data is configured and the privacy settings not changed by the user.

## Results
## 💎 Outputs

The script will return employee data as semi-colon separated values (like CSV):

Expand Down

0 comments on commit 6b61101

Please sign in to comment.