Added url parse compat.
Added url parse compat.
Use six iteritems.