url question - extracting (2 types of) domains

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 16 00:45:10 EDT 2007


En Tue, 15 May 2007 23:04:02 -0300, lazy <arunmail at gmail.com> escribió:

> Im trying to extract the domain name from an url. lets say I call
> it full_domain and significant_domain(which is the homepage domain)
> Eg: url=http://en.wikipedia.org/wiki/IPod ,
> full_domain=en.wikipedia.org ,significant_domain=wikipedia.org

You'll have to find a better definition of "significant_domain".
A vaguely related concept would be SOA - Start of Authority. You could  
issue DNS queries for a SOA record, removing the heading parts until you  
get a matching answer. See http://www.dnspython.org/

-- 
Gabriel Genellina




More information about the Python-list mailing list