class watson.http.uri.Url(url)[source]

An object based representation of a Url.


Initialize the url object.

Create a new Url object from either a well formed url string, a dict of key/values, or a ParseResult.

Parameters:url (mixed) – The value to generate the url from.

Returns the subdomain for the URL. With thanks: http://stackoverflow.com/questions/1189128/regex-to-extract-subdomain-from-url