https://github.com/leewr9/atlottery
Korean automatic lottery purchase program.
https://github.com/leewr9/atlottery
lotto pyside6 python selenium
Last synced: about 1 month ago
JSON representation
Korean automatic lottery purchase program.
- Host: GitHub
- URL: https://github.com/leewr9/atlottery
- Owner: leewr9
- License: mit
- Created: 2025-07-02T06:37:58.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-07-21T05:05:40.000Z (11 months ago)
- Last Synced: 2025-07-21T07:07:21.241Z (11 months ago)
- Topics: lotto, pyside6, python, selenium
- Language: Python
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoLottery
[](https://github.com/leewr9/atlottery/releases)
[](https://github.com/leewr9/atlottery/actions/workflows/exe-build-release.yml)
[](https://github.com/leewr9/atlottery/actions/workflows/weekly-purchase.yml)
This tool automates Korean lottery ticket purchases, providing both a PySide6-based GUI for interactive use and a command-line script for headless execution, allowing users to buy tickets automatically without opening a web browser.

## Feature
- Simple GUI built with PySide6
- Command-line script for headless execution
- Automated lottery purchase using Selenium
- No external web browser required
- Supports executable build with PyInstaller
## Installation
1. **Clone the repository**
```bash
git clone https://github.com/leewr9/atlottery.git
cd atlottery
```
2. **Install dependencies via uv**
```bash
uv sync
```
## Usage
### Run Script (Background)
```bash
uv run python cli_app.py
```
- Executes the lottery automation script without opening the GUI.
- Uses environment variables for configuration:
- `LOTTERY_USER` → Lottery account ID
- `LOTTERY_PASS` → Lottery account password
- `LOTTERY_COUNT` → Number of tickets to purchase (default: 5)
- `EMAIL_SENDER` → Email account for sending notifications (optional)
- `EMAIL_PASSWORD` → Password for the email account (required if `EMAIL_SENDER` is set)
- For Gmail, you can use an **App Password** generated here: https://myaccount.google.com/apppasswords
- If both `EMAIL_SENDER` and `EMAIL_PASSWORD` are provided, the script can send email notifications about the purchase result.
- Suitable for running in the background, scheduled tasks, or automated execution in GitHub Actions workflows.
- [example workflow](https://github.com/leewr9/atlottery/blob/master/.github/workflows/weekly-purchase.yml)
### Run GUI (Executable)
```bash
uv run python gui_app.py
```
- Launches the GUI for interactive use.
- Make sure the required resource files are correctly placed.
### Build Executable
You can build an executable file using PyInstaller and the provided spec file.
```bash
uv run pyinstaller ./atlottery.spec
```
- The executable will be created in the `dist` folder.
- Ensure the `atlottery.spec` file is correctly configured with resource paths and build options.
## License
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.