def url_equal(first, second, ignore_scheme=False, ignore_netloc=False, ignore_path=False, ignore_params=False,<EOL>ignore_query=False, ignore_fragment=False):
<EOL>firstp = urlparse(first)<EOL>secondp = urlparse(second)<EOL>return ((firstp.scheme == secondp.scheme or ignore_scheme) and<EOL>(firstp.netloc == secondp.netloc or ignore_netloc) and<EOL>(firstp.path == secondp.path or ignore_path) and<EOL>(firstp.params == secondp.params or ignore_params) and<EOL>(firstp.query == secondp.query or ignore_query) and<EOL>(firstp.fragment == secondp.fragment or ignore_fragment))<EOL>
Compare two URLs and return True if they are equal, some parts of the URLs can be ignored
:param first: URL
:param second: URL
:param ignore_scheme: ignore the scheme
:param ignore_netloc: ignore the netloc
:param ignore_path: ignore the path
:param ignore_params: ignore the params
:param ignore_query: ignore the query string
:param ignore_fragment: ignore the fragment
:return: result of comparison