I have two URLS from which I have extracted hostnames using urlparse(). The result is: URL1='ads.indiaresults.com' and URL2='haryana.indiaresults.com'
Now how can I check if they are from the same domain or website. I have to make a general method so that it works on all URLS as some time hostnames are like: (www.google.com , www.e-tutes.com)
==? Your URL1 and URL2 are different domains.urllib.parsefor bringing them into an equal format