def get_wget_download_size(command):
    # Wget supports HTTP, HTTPS and FTP protocols.
    if not command.startswith('wget '):
        return 0

    # Check the url(s) is/are valid.
    urls = re.findall(r'((?:https|http|ftp)://[^\s]+)', command)

    if not urls:
        return 0

    size = 0
    for url in urls:
        try:
            response = urllib2.urlopen(url)
            size += int(response.info().getheader('Content-Length'))
        except (urllib2.HTTPError, urllib2.URLError, ValueError, TypeError):
            pass
    return size
Adds a subelement to the end of this element.
dataset/ETHPy150Open owtf/owtf/install/space_checker_utils.py/get_wget_download_size--crossover with--dataset/ETHPy150Open flosch/simpleapi/example_project/client/python/sapi/message.py/MessageElement.append