https://github.com/puzza007/athop_transaction_scraper
https://github.com/puzza007/athop_transaction_scraper
athop auckland-transport scraper
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/puzza007/athop_transaction_scraper
- Owner: puzza007
- Created: 2018-07-28T20:48:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-11-29T00:18:54.000Z (7 months ago)
- Last Synced: 2025-12-01T01:51:05.085Z (7 months ago)
- Topics: athop, auckland-transport, scraper
- Language: Python
- Size: 158 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# AT HOP Transaction Scraper
Automatically scrapes Auckland Transport HOP card transactions and stores them in SQLite with optional Slack notifications.
## Quick Start
```bash
# Copy and edit environment variables
cp .env.example .env
# Edit .env with your credentials
# Run with Docker
docker-compose up -d
# View logs
docker-compose logs -f
```
Your data will be in `./data/athop.db`
## Configuration
All configuration via `.env` file:
**Required:**
- `AT_USERNAME` - AT HOP account email
- `AT_PASSWORD` - Account password
- `AT_CARDS` - Card numbers (comma-separated, optional names: `123:Name,456:Other`)
**Optional:**
- `AT_PERIOD` - Scrape interval in seconds (default: 3600)
- `AT_STARTUP_DELAY` - Initial delay in seconds (default: 60)
- `AT_SLACK_API_TOKEN` - Slack bot token for notifications
- `AT_SLACK_CHANNEL` - Slack channel (e.g., `#notifications`)
See `.env.example` for template.
## Development
```bash
# Install dependencies
uv sync
# Run locally
uv run python athop_transaction_scraper.py
# Format and type check
uv run black .
uv run mypy athop_transaction_scraper.py
```