Wedding Planning Meets Hacking

As of today, my fiancée and I are just under 100 days from our upcoming wedding. And while we haven’t run into many wedding planning snafus, it’s been easy to find technological annoyances, especially when dealing with different companies or technologies for different aspects of the wedding: save-the-dates, website, registries, invitations, RSVPs, and more. (Yes, I know The Knot has all that functionality, but sometimes one feature works or looks better on one site and another is better on another site.)

The other day we were working on gathering the addresses of all our invitees. We had used Minted for our Save the Dates (but wanted to use Elli for our actual invitations; the design better matches our website). I went to the helpful-sounding “Address Assistant” feature to pull the existing contacts from our address book in Minted, but it didn’t seem possible.

Minted.com thinks this is good enough?

Option #1: A little scraping

Okay, so Minted (as shown above) allows you to print your contact list and in doing so displays all the contacts in a new print-friendly, formatted, separate window. I decided to scrape that page using Beautiful Soup along with Selenium to help deal with the fact that I needed to login with my Minted credentials to gain access to my address book contents.

Inspecting the print contacts page, you notice that it’s pretty sparsely laid out as one giant unordered list without any organization of the different address fields. Rather the street address and town/state/zip code are text blocks under the same class name “contact-address” separated only by a <br> tag.

Sparsely formatted addresses in html (Identifying information has been removed)

A little data cleaning with regular expressions, I was quickly able to programmatically output my list of addresses to an excel file. It wasn’t ideal — the regex works for US formatted addresses, but it got the job done. But could there be a better way?

Option #2: Is that an API I see there?

Searching Twitter, it was clear that I wasn’t the only one upset about Minted not having an export feature….

Sorry I wasn’t there in time … I hope Dave’s okay 🤞

But as @z3dster points out, there’s a little more than meets the eye at first glance…

Clearly Minted is using their API to power the address book features. They have all your address book fields neatly organized in a JSON format, but never got around to building an address export feature. (I guess that’s one way to try to prop up customer stickiness…?)

This revelation led me to simplify the script significantly by using Selenium-Requests. Tapping into the existing API you can receive all the address book fields (address1, address2, locality, administrative_area, postal_code, country) automatically neatly organized regardless of the locale. Within 10 seconds, your full Minted address book is exported to an excel spreadsheet!

Check out the code on my GitHub repo and please reach out if you need any assistance!

Hope it helps a few happy couples navigate their wedding planning process as well — if you really love it feel free to contribute to our Newlywed Fund!

--

--

--

Data scientist; CFA charterholder and financial valuation specialist; avid golfer and racquet sport aficionado; homebrewing hobbyist; TWTR: @wmkarney

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Will Karnasiewicz

Will Karnasiewicz

Data scientist; CFA charterholder and financial valuation specialist; avid golfer and racquet sport aficionado; homebrewing hobbyist; TWTR: @wmkarney

More from Medium

Demystifying No-Code — Bubble Tips and Tricks — How to send data across pages using Bubble

AI tools are killing conventional Dashboards

What Is Snowflake Database — Guide for 2022

Product Assortment Optimization Process: a Must-Have Approach for Retailing | DataOx