exitlight 0.1.0
A privacy-oriented CLI tool to discover legitimate contact methods for data access, deletion, or modification requests.
Requires Python: <3.15,>=3.10
Keywords: privacy, gdpr, data-protection, dsar, compliance, right-to-erasure, email-discovery, email-extraction, web-crawling, web-scraping, automated-browsing, playwright, cli

<div align="center">

# exitlight

**Find the exit.** 🚪

_Contact websites about your personal data, the fair and legitimate way._

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://img.shields.io/pypi/v/exitlight.svg)](https://pypi.org/project/exitlight/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)

</div>

## ✨ What is exitlight?

`exitlight` is a CLI tool that helps you find the right contact information to contact a website about your personal data (_DSAR_ - Data Subject Access Requests).

Given a website URL, it:

1. discovers candidate links likely to be a Privacy Policy page
2. visits those candidates (using a headless browser)
3. extracts privacy-related contact methods (for now: _email addresses_)
4. outputs a report you can use to contact the website about your personal data (JSON by default, or a plain-text email list)

## 🚀 Features

### Core functionality

- Finds and ranks privacy-policy candidates from the source page.
- Extracts emails from both page text and `mailto:` links.
- Produces a structured JSON report with per-candidate results and a consolidated email list.
- Batch mode: process a file of URLs (one per line).

### Responsible by design

- Respects `robots.txt` by default (can be disabled for manual testing).
- Applies a fixed delay between page visits to reduce server load (`--delay`).
- Blocks images/media/fonts to reduce load (`--no-resources-block` to disable).
- Uses a custom transparent default User-Agent with a CLI override (`--user-agent`).

## 📦 Installation

Requires Python 3.10+.

### Install from PyPI

```bash
pip install exitlight
```

Install Playwright browser binaries (required on first install):

```bash
playwright install
```

## ⚡ Quick start

Show all options:

```bash
exitlight --help
```

Scan a single site and print the full JSON report:

```bash
exitlight example.com
```

Print only the consolidated email list (one per line):

```bash
exitlight example.com --format plain
```

Write JSON output to a file:

```bash
exitlight example.com --output report.json
```

Batch mode (one URL per line):

```bash
exitlight urls.txt --output batch.json
```

Notes:

- `exitlight` respects `robots.txt` by default; use `--ignore-robots` for manual testing only.
- If you need a different request identity, override the User-Agent via `--user-agent`.
- Batch mode is intended for small, user-curated lists of websites.

## ⚠️ Disclaimer

This project is provided for educational and personal use purposes.

The author does not take responsibility for how this software is used.
Users are solely responsible for ensuring that their use of this tool
complies with applicable laws, website Terms of Service, and `robots.txt` policies.

This tool accesses only publicly available pages and does not attempt
to bypass authentication, paywalls, or anti-bot protections.

## 📄 License

MIT. See `LICENSE`.