initial commit
This commit is contained in:
39
CLAUDE.md
Normal file
39
CLAUDE.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is a Python automation script that downloads Amazon order invoices in bulk using Selenium WebDriver. It reads order IDs from [orders.txt](orders.txt) and automates the process of navigating to invoice pages and triggering the print dialog for each order.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- Python 3.x with `selenium` package
|
||||
- Chrome browser with ChromeDriver
|
||||
- Virtual environment in `venv/` directory
|
||||
|
||||
## Running the Script
|
||||
|
||||
1. Activate the virtual environment:
|
||||
- Windows: `venv\Scripts\activate`
|
||||
- Unix/macOS: `source venv/bin/activate`
|
||||
|
||||
2. Run the script:
|
||||
```
|
||||
python invoices.py
|
||||
```
|
||||
|
||||
3. When prompted, manually log into Amazon in the browser window, then press Enter in the terminal to continue
|
||||
|
||||
4. The script will iterate through each order ID in [orders.txt](orders.txt) and open the print dialog for the invoice
|
||||
|
||||
## Input Format
|
||||
|
||||
[orders.txt](orders.txt) should contain one Amazon order ID per line (format: `XXX-XXXXXXX-XXXXXXX`)
|
||||
|
||||
## Architecture Notes
|
||||
|
||||
- The script uses direct URL construction to access invoice print pages: `https://www.amazon.com/gp/css/summary/print.html?orderID={order}`
|
||||
- Manual authentication is required due to Amazon's login protections
|
||||
- 3-second delay between orders to avoid rate limiting
|
||||
- Print dialog is triggered via JavaScript (`window.print()`) - user must manually save each PDF
|
||||
Reference in New Issue
Block a user