'For loading up a description object from a url. Normally
you\'ll probably just want to pass a URL into the constructor.'

def load(self, url):

    br = browser()
    with closing(br.open(url, timeout=15)) as f:
        doc = etree.fromstring(f.read())
    self.urls = []
    for element in doc.xpath(u'//*[local-name()    =    "Url"]'):
        template = element.get(u'template')
        type = element.get(u'type')
        if (template and type):
            url = URL()
            url.template = template
            url.type = type
            self.urls.append(url)
    for element in doc.xpath(u'//*[local-name()    =    "link"]'):
        if (element.get(u'rel') != u'search'):
            continue
        href = element.get(u'href')
        type = element.get(u'type')
        if (href and type):
            url = URL()
            url.template = href
            url.type = type
            self.urls.append(url)
    self.url = u''
    if (not self.urls):
        self.url = u''.join(doc.xpath(u'//*[local-name()    =    "Url"][1]//text()'))
    self.format = u''.join(doc.xpath(u'//*[local-name()    =    "Format"][1]//text()'))
    self.shortname = u''.join(doc.xpath(u'//*[local-name()    =    "ShortName"][1]//text()'))
    self.longname = u''.join(doc.xpath(u'//*[local-name()    =    "LongName"][1]//text()'))
    self.description = u''.join(doc.xpath(u'//*[local-name()    =    "Description"][1]//text()'))
    self.image = u''.join(doc.xpath(u'//*[local-name()    =    "Image"][1]//text()'))
    self.sameplesearch = u''.join(doc.xpath(u'//*[local-name()    =    "SampleSearch"][1]//text()'))
    self.developer = u''.join(doc.xpath(u'//*[local-name()    =    "Developer"][1]//text()'))
    self.contact = u''.join(doc.xpath(u'/*[local-name()    =    "Contact"][1]//text()'))
    self.attribution = u''.join(doc.xpath(u'//*[local-name()    =    "Attribution"][1]//text()'))
    self.syndicationright = u''.join(doc.xpath(u'//*[local-name()    =    "SyndicationRight"][1]//text()'))
    tag_text = u'    '.join(doc.xpath(u'//*[local-name()    =    "Tags"]//text()'))
    if (tag_text is not None):
        self.tags = tag_text.split(u'    ')
    self.adultcontent = doc.xpath(u'boolean(//*[local-name()    =    "AdultContent"    and    contains(.,    "true")])')
