Automate daily 10bis voucher purchases to maximize your meal budget. Never miss a day of ordering again!
This bot automatically purchases Shufersal vouchers (or any other item) from 10bis, checking your daily and monthly budget limits before ordering. Perfect for employees who want to consistently use their 10bis allowance without manual daily ordering.
- ✅ Checks daily and monthly budget before purchasing
- ✅ Skips purchase if budget is exceeded
- ✅ Saves order confirmations (PDF + screenshot)
- ✅ Persistent browser session (login once, stay logged in)
- ✅ Dry-run mode for testing
- ✅ Debug mode for troubleshooting
- 10bis account with MFA enabled (email + OTP SMS login)
- Python 3.13+
- uv (Python package manager) - Install here
# Install Python dependencies
uv sync
# Install Playwright browsers (required for automation)
uv run playwright install chromiumAlternatively, use the Makefile:
make playwright-installCreate a .env file from the example:
cp .env.example .envEdit .env and update these required settings:
EMAIL="your.email@company.com" # Your 10bis login email
DRY_RUN="False" # Set to False to actually place ordersOptional settings (defaults usually work fine):
ITEM_URL="..." # Change to purchase different items
ITEM_PRICE="200.00" # Update if item price changes
HEADLESS="True" # Set to False to see the browser window
DEBUG="False" # Set to True for detailed logsRun with dry-run enabled first to set up your login:
make run
# or: uv run main.pyWhat happens:
- Browser opens to 10bis
- You'll be prompted to login (email + OTP code)
- Login session is saved in
./profile/directory - Budget is checked and displayed
- Purchase is simulated (dry-run mode)
Note: You only need to login once! The session persists across runs.
Once you've tested with dry-run, disable it in .env:
DRY_RUN="False"Now running make run will actually place orders!
make run- Checks if you're logged in (uses saved session)
- Navigates to Transactions Report
- Reads your monthly and daily budget balance
- Compares budget to item price
- If sufficient budget:
- Adds item to cart
- Proceeds to checkout
- Places order (unless
DRY_RUN=True) - Saves confirmation screenshot and PDF
- If insufficient budget:
- Logs warning and exits
To run this automatically every weekday at 10 AM, add to your crontab:
# Edit crontab
crontab -e
# Add this line (update path to your project):
0 10 * * 1-5 cd /path/to/auto10bis && /usr/local/bin/uv run main.pyOr use a scheduler like:
- macOS: launchd
- Linux: systemd timer
- Windows: Task Scheduler
Orders are saved in two locations:
./screenshots/ # PNG screenshots of order confirmation
./orders/ # PDF copies of order confirmation
Files are named with timestamps: order-20250121-103045.png
| Variable | Default | Description |
|---|---|---|
EMAIL |
Required | Your 10bis login email |
ITEM_URL |
Shufersal ₪200 | URL of item to purchase |
ITEM_PRICE |
200.00 | Price of item (for budget checking) |
HEADLESS |
True | Run browser in background |
DRY_RUN |
True | Simulate purchase without actually ordering |
DEBUG |
False | Show detailed debug logs |
BASE_URL |
10bis homepage | 10bis website URL |
USER_DATA_DIR |
./profile | Where to save browser session |
You forgot to set EMAIL in your .env file.
Fix: Copy .env.example to .env and add your email.
Playwright browsers aren't installed.
Fix: Run uv run playwright install chromium
You're already logged in! The bot will proceed normally.
Debug: Enable DEBUG=True in .env to see detailed logs.
Either your budget is exhausted or the page structure changed.
Debug:
- Set
HEADLESS=Falseto watch the browser - Set
DEBUG=Truefor detailed logs - Check if 10bis changed their website layout
The saved session in ./profile/ might be corrupted.
Fix: Delete the ./profile/ directory and login again.
- Go to 10bis website
- Find the item you want
- Copy the full URL (including
?dishId=...) - Update
ITEM_URLin.env - Update
ITEM_PRICEto match the item's price
.
├── main.py # Main bot logic
├── log.py # Logger configuration
├── utils.py # Helper functions
├── settings.py # (if exists)
├── .env # Your configuration
├── profile/ # Browser session data
├── screenshots/ # Order screenshots
└── orders/ # Order PDFs
Enable detailed logging to troubleshoot issues:
DEBUG="True"This logs every browser interaction, button click, and navigation step.
make run # Run the bot
make playwright-install # Install browser engines- Budget checking: Never exceeds your daily or monthly limit
- Dry-run mode: Test without placing real orders
- Persistent session: Login once, not every time
- Order confirmations: Saved for your records
- Test first: Always run with
DRY_RUN=Truebefore going live - Check logs: Review what happened after each run
- Backup confirmations: Keep the PDFs in
./orders/for expense reports - Monitor budget: Bot logs your remaining budget each run
- Headless mode: Keep
HEADLESS=Truefor scheduled runs
MIT (or whatever you prefer)
Found a bug or have a question? Open an issue on GitHub!