watson.http.uri

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

An object based representation of a Url.

__init__(url)[source]

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.
subdomain

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