https://github.com/fedragon/mywheels-scraper
Small utility to export invoices from the MyWheels website into CSV and/or JSON
https://github.com/fedragon/mywheels-scraper
Last synced: 4 months ago
JSON representation
Small utility to export invoices from the MyWheels website into CSV and/or JSON
- Host: GitHub
- URL: https://github.com/fedragon/mywheels-scraper
- Owner: fedragon
- Created: 2024-11-18T05:48:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T20:16:12.000Z (4 months ago)
- Last Synced: 2025-03-24T09:45:10.615Z (4 months ago)
- Language: Python
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MyWheels scraper
aka: what you end up doing when you periodically want to know how much you're spending using the [MyWheels](https://mywheels.nl) service, but there's "download all invoices to CSV" button on their website.
This small utility collects my invoices' history from the [MyWheels website](https://mywheels.nl), storing them to a local sqlite3 database and (optionally) exporting them to CSV and/or JSON. When run over an existing database, it only collects the new invoices, if any.
## Run
Install dependencies with:
```shell
uv sync
```### Download and export invoices
1. Run the Chromium version installed by Playwright in debug mode, e.g.
```shell
~/Library/Caches/ms-playwright/chromium-1140/chrome-mac/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9222
```2. In the browser window that just opened, login to your MyWheels account
3. Run
```shell
# download invoices and export them as csv
uv run src/app/main.py --download True --export csv# ... or export them as json
uv run src/app/main.py --download True --export json# ... or both
uv run src/app/main.py --download True --export csv json
```### Only export pre-downloaded invoices
```shell
# export them as csv
uv run src/app/main.py --export csv# ... or export them as json
uv run src/app/main.py --export json# ... or both
uv run src/app/main.py --export csv json
```### Visualize totals by month in bar chart
```shell
# can be combined with any other flag
uv run src/app/main.py --visualize True
```