def url_dict(self, url):
parsed = urlparse.urlparse(url)<EOL>query = urlparse.parse_qs(parsed.query)<EOL>return {<EOL>'<STR_LIT>': parsed.scheme,<EOL>'<STR_LIT>': parsed.netloc,<EOL>'<STR_LIT:path>': parsed.path,<EOL>'<STR_LIT>': parsed.params,<EOL>'<STR_LIT>': query,<EOL>'<STR_LIT>': parsed.fragment,<EOL>}<EOL>
Parse the URL into a format suitable for comparison, ignoring the query
parameter order.