Helper functions for turning raw URLs into a dict suitable for building SQL queries