def format_src(src, url):
    """
        Reformat links and urls from the DOM.

        This reformat urls and links from the DOM by adding (if not present) the
        main dns of the website showcases by the server. This get rid of relative
        paths associated with link ref of the DOM.

        :param src: An url to reformat
        :param url: A main url of a website
        :type src: str
        :type url: str
        :return: The formated reference
        :rtype: str
    """
    if not src.startswith('http'):
        if src.startswith('/'):
            if src.startswith('//'):
                return 'https:{}'.format(src)
            else:
                return '{}{}'.format(url, src)
        else:
            return '{}/{}'.format(url, src)
    else:
        return '{}'.format(src)
    return '{}'.format(src)