code: def update_details(profile_tree, details):
      
      div = profile_tree.xpath("//div[@id = 'profile_details']")[0]
      for dl in div.iter('dl'):
          title = dl.find('dt').text
          item = dl.find('dd')
          if title == 'Last Online' and item.find('span') is not None:
              details[title.lower()] = item.find('span').text.strip()
          elif title.lower() in details and len(item.text):
              details[title.lower()] = item.text.strip()
          else:
              continue
          details[title.lower()] = replace_chars(details[title.lower()])
docs: Update details attribute of a Profile.