<aside>

A Python script that automatically extracts all your flight history from TripIt and exports it in an OpenFlights-compatible CSV format.


Inspired by the challenges of executing Step 4 in this Reddit post to get historical flights from TripIt into the (excellent) Flighty app.

</aside>

<aside> 👉

Access here: Script and Quick Start Guide on Github

</aside>

What the script does

This script:

  1. Opens TripIt in an automated browser
  2. Navigates through all your past trips on the TripIt website Uses a Python library called Playwright that opens/controls a Chrome window automatically on your behalf
  3. Uses Anthropic Claude for AI-powered data extraction of flight details from each trip page Uses Haiku, Claude’s fastest/cheapest model via the Claude API
  4. Exports everything to a CSV file compatible with OpenFlights

What you get: CSV Output Format

The CSV uses the OpenFlights schema with these columns populated:

Other OpenFlights columns (Airline, Distance, Seat, Class, etc.) are intentionally left blank. OpenFlights should populate Airline and Distance automatically based on the other 4 populated fields. You can fill in the rest manually if desired.

New to vibe-coding?

I expect non-technical folks will have questions on how to get this working. As someone who is not a software engineer by any means, here’s how I would approach using LLMs to help me out.

Use LLMs to debug

Copy and paste this prompt into any LLM (Claude, ChatGPT, etc.), attaching the script (triprip.py) and the Quick Start Guide, to get help.

<aside>

I'm trying to use a Python script that exports flight history from TripIt. I have two documents: (1) The Python script, and (2) The quick start guide.

Here's where I'm stuck: [setup, installation, running the script, etc.]

Here's what I see in the terminal: [paste any error messages here]

Here’s my setup: [Mac/Windows/Linux, python version, etc]

Can you help me understand what's wrong and what I should do next? Please explain in simple terms - I'm not very experienced with coding.

</aside>